13
simple question regarding C++ code:
for(int i=0;i<npts;i++)
{
for(int j=i;j<2*ndim;j++)
{
if(funcEvals[i]<bestListEval[j])
{
bestListEval[j] = funcEvals[i];
for(int k=0;k<m_ndim;k++)
bestList[j][k] = simplex[i][k];
break;
}
}
}
I want to ensure that
- Each line of
double **simplexis inserted at most once indouble **bestList - The instance of
breakhere breaks out of the second (inner)forloop.
Is this the case?