aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/NonLinearOptimization.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unsupported/test/NonLinearOptimization.cpp')
-rw-r--r--unsupported/test/NonLinearOptimization.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/unsupported/test/NonLinearOptimization.cpp b/unsupported/test/NonLinearOptimization.cpp
index d7376b0f5..702bb7c60 100644
--- a/unsupported/test/NonLinearOptimization.cpp
+++ b/unsupported/test/NonLinearOptimization.cpp
@@ -1262,8 +1262,8 @@ void testNistBoxBOD(void)
// check return value
VERIFY_IS_EQUAL(info, 1);
- VERIFY_IS_EQUAL(lm.nfev, 31);
- VERIFY_IS_EQUAL(lm.njev, 25);
+ VERIFY(lm.nfev < 31); // 31
+ VERIFY(lm.njev < 25); // 25
// check norm^2
VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 1.1680088766E+03);
// check x
@@ -1342,10 +1342,6 @@ void testNistMGH17(void)
lm.parameters.maxfev = 1000;
info = lm.minimize(x);
- // check return value
- VERIFY_IS_EQUAL(info, 2);
- VERIFY_IS_EQUAL(lm.nfev, 602 );
- VERIFY_IS_EQUAL(lm.njev, 545 );
// check norm^2
VERIFY_IS_APPROX(lm.fvec.squaredNorm(), 5.4648946975E-05);
// check x
@@ -1354,6 +1350,11 @@ void testNistMGH17(void)
VERIFY_IS_APPROX(x[2], -1.4646871366E+00);
VERIFY_IS_APPROX(x[3], 1.2867534640E-02);
VERIFY_IS_APPROX(x[4], 2.2122699662E-02);
+
+ // check return value
+ VERIFY_IS_EQUAL(info, 2);
+ VERIFY(lm.nfev < 650); // 602
+ VERIFY(lm.njev < 600); // 545
/*
* Second try
@@ -1832,8 +1833,8 @@ void test_NonLinearOptimization()
// NIST tests, level of difficulty = "Average"
CALL_SUBTEST/*_5*/(testNistHahn1());
CALL_SUBTEST/*_6*/(testNistMisra1d());
-// CALL_SUBTEST/*_7*/(testNistMGH17());
-// CALL_SUBTEST/*_8*/(testNistLanczos1());
+ CALL_SUBTEST/*_7*/(testNistMGH17());
+ CALL_SUBTEST/*_8*/(testNistLanczos1());
// // NIST tests, level of difficulty = "Higher"
CALL_SUBTEST/*_9*/(testNistRat42());