diff options
author | 2009-08-24 17:47:35 +0200 | |
---|---|---|
committer | 2009-08-24 17:47:35 +0200 | |
commit | 17905c73996aa0a4a3e5146457af29eb827c7422 (patch) | |
tree | 959498630ee6fed7bbde1d456de86458659f4142 /unsupported/test/NonLinear.cpp | |
parent | f69869c42a9dcb4b828e0babdaa323baf6b0afec (diff) |
eigenization of ei_covar()
Diffstat (limited to 'unsupported/test/NonLinear.cpp')
-rw-r--r-- | unsupported/test/NonLinear.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/unsupported/test/NonLinear.cpp b/unsupported/test/NonLinear.cpp index 14d887fc3..6bb07a716 100644 --- a/unsupported/test/NonLinear.cpp +++ b/unsupported/test/NonLinear.cpp @@ -166,7 +166,7 @@ void testLmder() { const int m=15, n=3; int info, nfev=0, njev=0; - double fnorm, covfac, covar_ftol; + double fnorm, covfac; VectorXd x(n), fvec(m), diag(n), qtf; MatrixXd fjac; VectorXi ipvt; @@ -192,11 +192,9 @@ void testLmder() VERIFY_IS_APPROX(x, x_ref); // check covariance - covar_ftol = epsilon<double>(); covfac = fnorm*fnorm/(m-n); - VectorXd wa(n); ipvt.cwise()+=1; // covar() expects the fortran convention (as qrfac provides) - ei_covar<double>(n, fjac.data(), m, ipvt.data(), covar_ftol, wa.data()); + ei_covar<double>(fjac, ipvt); MatrixXd cov_ref(n,n); cov_ref << @@ -543,7 +541,7 @@ void testLmdif() { const int m=15, n=3; int info, nfev=0; - double fnorm, covfac, covar_ftol; + double fnorm, covfac; VectorXd x(n), fvec(m), diag(n), qtf; MatrixXd fjac; VectorXi ipvt; @@ -568,11 +566,9 @@ void testLmdif() VERIFY_IS_APPROX(x, x_ref); // check covariance - covar_ftol = epsilon<double>(); covfac = fnorm*fnorm/(m-n); - VectorXd wa(n); ipvt.cwise()+=1; // covar() expects the fortran convention (as qrfac provides) - ei_covar<double>(n, fjac.data(), m, ipvt.data(), covar_ftol, wa.data()); + ei_covar<double>(fjac, ipvt); MatrixXd cov_ref(n,n); cov_ref << |