-
Saree90 authored
Mat_<double> coord_sum(1,ndim,0.0),buf(1,ndim,0.0),y(1,ndim,0.0); nfunk = 0; for(i=0;i<ndim+1;++i) { y(i) = f->calc(p[i]); } y has only ndim elements, while the loop goes over ndim+17f7064e3
Mat_<double> coord_sum(1,ndim,0.0),buf(1,ndim,0.0),y(1,ndim,0.0);
nfunk = 0;
for(i=0;i<ndim+1;++i)
{
y(i) = f->calc(p[i]);
}
y has only ndim elements, while the loop goes over ndim+1