From 17905c73996aa0a4a3e5146457af29eb827c7422 Mon Sep 17 00:00:00 2001 From: Thomas Capricelli Date: Mon, 24 Aug 2009 17:47:35 +0200 Subject: eigenization of ei_covar() --- unsupported/test/NonLinear.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'unsupported/test/NonLinear.cpp') 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(); covfac = fnorm*fnorm/(m-n); - VectorXd wa(n); ipvt.cwise()+=1; // covar() expects the fortran convention (as qrfac provides) - ei_covar(n, fjac.data(), m, ipvt.data(), covar_ftol, wa.data()); + ei_covar(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(); covfac = fnorm*fnorm/(m-n); - VectorXd wa(n); ipvt.cwise()+=1; // covar() expects the fortran convention (as qrfac provides) - ei_covar(n, fjac.data(), m, ipvt.data(), covar_ftol, wa.data()); + ei_covar(fjac, ipvt); MatrixXd cov_ref(n,n); cov_ref << -- cgit v1.2.3