merge both c methods hybrj1/hybrj into one class HybridNonLinearSolver with

two methods. hybrd stuff renamed to HybridNonLinearSolverNumericalDiff.
This commit is contained in:
Thomas Capricelli
2009-08-25 13:56:25 +02:00
parent a043708e87
commit d880e6f774
5 changed files with 96 additions and 57 deletions

View File

@@ -269,7 +269,9 @@ void testHybrj1()
x.setConstant(n, -1.);
// do the computation
info = ei_hybrj1(hybrj_functor(), x,fvec, fjac);
hybrj_functor functor;
HybridNonLinearSolver<hybrj_functor,double> solver(functor);
info = solver.solve(x, fvec, fjac);
// check return value
VERIFY( 1 == info);
@@ -301,7 +303,9 @@ void testHybrj()
diag.setConstant(n, 1.);
// do the computation
info = ei_hybrj(hybrj_functor(), x,fvec, nfev, njev, fjac, R, qtf, diag, mode);
hybrj_functor functor;
HybridNonLinearSolver<hybrj_functor,double> solver(functor);
info = solver.solve(x,fvec, nfev, njev, fjac, R, qtf, diag, mode);
// check return value
VERIFY( 1 == info);
@@ -353,7 +357,7 @@ void testHybrd1()
// do the computation
hybrd_functor functor;
HybridNonLinearSolver <hybrd_functor,double> solver(functor);
HybridNonLinearSolverNumericalDiff <hybrd_functor,double> solver(functor);
info = solver.solve(x, fvec);
// check return value
@@ -385,7 +389,7 @@ void testHybrd()
// do the computation
hybrd_functor functor;
HybridNonLinearSolver <hybrd_functor,double> solver(functor);
HybridNonLinearSolverNumericalDiff <hybrd_functor,double> solver(functor);
info = solver.solve(x,fvec, nfev, fjac, R, qtf, diag, mode, ml, mu);
// check return value