aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test
diff options
context:
space:
mode:
authorGravatar Thomas Capricelli <orzel@freehackers.org>2009-08-12 02:34:22 +0200
committerGravatar Thomas Capricelli <orzel@freehackers.org>2009-08-12 02:34:22 +0200
commit7b922eb6347d0e6f2167cb39d2078d225abd6509 (patch)
tree21a44c1f15d12af2fdd5ce8030ca3fcc3383a21f /unsupported/test
parentfd307b8f3fa8ba07e091c994136042eb3637b565 (diff)
BoxBOD : oops.. shame on me, i did a mistake in the derivative.... now we need 16
iterations instead of 7693 ;-) the first test still fails though.
Diffstat (limited to 'unsupported/test')
-rw-r--r--unsupported/test/NonLinear.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/unsupported/test/NonLinear.cpp b/unsupported/test/NonLinear.cpp
index ada37acc1..ea72476f0 100644
--- a/unsupported/test/NonLinear.cpp
+++ b/unsupported/test/NonLinear.cpp
@@ -1273,7 +1273,7 @@ struct BoxBOD_functor {
for(i=0; i<6; i++) {
double e = exp(-b[1]*x[i]);
fjac[i+ldfjac*0] = 1.-e;
- fjac[i+ldfjac*1] = b[1]*x[i]*e;
+ fjac[i+ldfjac*1] = b[0]*x[i]*e;
}
}
return 0;
@@ -1296,7 +1296,7 @@ void testNistBoxBOD(void)
*/
x<< 1., 1.;
// do the computation
- info = ei_lmder<BoxBOD_functor, double>(x, fvec, nfev, njev, fjac, ipvt, wa1, diag,
+ info = ei_lmder<BoxBOD_functor, double>(x, fvec, nfev, njev, fjac, ipvt, wa1, diag);
1, 100., 14000, Eigen::machine_epsilon<double>(), Eigen::machine_epsilon<double>());
// check return value
@@ -1304,8 +1304,8 @@ void testNistBoxBOD(void)
printf("norm2 = %.50g\n", fvec.squaredNorm());
std::cout << x << std::endl;
VERIFY( 1 == info);
- VERIFY( 55 == nfev);
- VERIFY( 11 == njev);
+ VERIFY( 10 == nfev);
+ VERIFY( 6 == njev);
// check norm^2
VERIFY_IS_APPROX(fvec.squaredNorm(), 1.1680088766E+03);
// check x
@@ -1322,9 +1322,9 @@ void testNistBoxBOD(void)
1, 100., 14000, Eigen::machine_epsilon<double>(), Eigen::machine_epsilon<double>());
// check return value
- VERIFY( 2 == info);
- VERIFY( 7693 == nfev);
- VERIFY( 5871 == njev);
+ VERIFY( 1 == info);
+ VERIFY( 16 == nfev);
+ VERIFY( 15 == njev);
// check norm^2
VERIFY_IS_APPROX(fvec.squaredNorm(), 1.1680088766E+03);
// check x