本文整理汇总了C++中IVector::Free方法的典型用法代码示例。如果您正苦于以下问题:C++ IVector::Free方法的具体用法?C++ IVector::Free怎么用?C++ IVector::Free使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVector
的用法示例。
在下文中一共展示了IVector::Free方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: calcDPosPeierlsNabarro_interm
void AppWin::calcDPosPeierlsNabarro_interm()
{
int icurr = tabWidget->currentIndex();
PltWin *pwthis = plotWidget[icurr];
PltWin *pw;
FILE *f;
DVector ubat, dpos(2);
IVector at;
double ubmin, ubmax;
int i, istart, iend, nat, j;
bool ok;
// if (pwthis->nchain==0) {
// f = fopen("ub_pos.dat", "w+");
// fclose(f);
// }
if (pwthis->applyHow==0)
istart = iend = icurr;
else {
istart = 0;
iend = tabWidget->count()-1;
}
at.Allocate(30); at.EnlargeStep(10);
ubat.Allocate(30); ubat.EnlargeStep(10);
for (i=istart; i<=iend; i++) {
pw = plotWidget[i];
if (!pw->isSelected) continue;
if (i != icurr) {
pw->applyHow = pwthis->applyHow;
pw->napicked = pwthis->napicked;
pw->apicked = pwthis->apicked;
}
ok = findDPosPeierlsNabarro(pw, dpos, nat, at, ubat, ubmin, ubmax);
if (!ok) {
msgError(err_DPosPeierlsNabarro);
at.Free();
ubat.Free();
pw->napicked = 0;
pwthis->repaint();
return;
}
if (pw->nchain == 0) {
pw->dposchain.Allocate(6,2); pw->dposchain.EnlargeStep(2,0);
pw->nachain.Allocate(6); pw->nachain.EnlargeStep(2);
pw->achain.Allocate(6,30); pw->achain.EnlargeStep(2,10);
pw->ubchain.Allocate(6,30); pw->ubchain.EnlargeStep(2,10);
pw->ubchain_min.Allocate(6); pw->ubchain_min.EnlargeStep(2);
pw->ubchain_max.Allocate(6); pw->ubchain_max.EnlargeStep(2);
}
pw->nchain++;
pw->dposchain(pw->nchain,1) = dpos(1);
pw->dposchain(pw->nchain,2) = dpos(2);
pw->nachain(pw->nchain) = nat;
pw->ubchain_min(pw->nchain) = ubmin;
pw->ubchain_max(pw->nchain) = ubmax;
for (j=1; j<=nat; j++) {
pw->achain(pw->nchain,j) = at(j);
pw->ubchain(pw->nchain,j) = ubat(j);
}
pw->napicked = 0;
}
at.Free();
ubat.Free();
pwthis->repaint();
}