be (hopefully) smarter with indices convention : we keep the c convention

(0->n-1) as much as possible, and only convert at borders with
fortran-expecting methods, that will eventually dissapear.
This commit is contained in:
Thomas Capricelli
2009-08-21 04:16:37 +02:00
parent 524e112ee5
commit 2e3d17c3ce
3 changed files with 14 additions and 5 deletions

View File

@@ -246,6 +246,7 @@ void testLmder()
covar_ftol = epsilon<double>();
covfac = fnorm*fnorm/(m-n);
VectorXd wa(n);
ipvt.cwise()+=1; // covar() expects the fortran convention (as qrfac provides)
covar(n, fjac.data(), m, ipvt.data(), covar_ftol, wa.data());
MatrixXd cov_ref(n,n);
@@ -761,6 +762,7 @@ void testLmdif()
covar_ftol = epsilon<double>();
covfac = fnorm*fnorm/(m-n);
VectorXd wa(n);
// ipvt.cwise()+=1; // covar() expects the fortran convention (as qrfac provides)
covar(n, fjac.data(), m, ipvt.data(), covar_ftol, wa.data());
MatrixXd cov_ref(n,n);