NonLinearOptimization : clean 'mode' handling from the old minpack code :

* this is actually a boolean, not an int
* use a better name
* can be set at initialization time instead of bloating all methods signatures
This commit is contained in:
Thomas Capricelli
2010-02-21 12:41:37 +01:00
parent 608959aa6f
commit a7d085eb4e
3 changed files with 68 additions and 141 deletions

View File

@@ -317,7 +317,8 @@ void testHybrj()
hybrj_functor functor;
HybridNonLinearSolver<hybrj_functor> solver(functor);
solver.diag.setConstant(n, 1.);
info = solver.solve(x, 2);
solver.useExternalScaling = true;
info = solver.solve(x);
// check return value
VERIFY( 1 == info);
@@ -401,7 +402,8 @@ void testHybrd()
solver.parameters.nb_of_subdiagonals = 1;
solver.parameters.nb_of_superdiagonals = 1;
solver.diag.setConstant(n, 1.);
info = solver.solveNumericalDiff(x, 2);
solver.useExternalScaling = true;
info = solver.solveNumericalDiff(x);
// check return value
VERIFY( 1 == info);