merge both c methods hybrd/hybrd1 into one class HybridNonLinearSolver with

two methods.
This commit is contained in:
Thomas Capricelli
2009-08-25 13:48:25 +02:00
parent 602b13815f
commit a043708e87
4 changed files with 91 additions and 55 deletions

View File

@@ -352,7 +352,9 @@ void testHybrd1()
x.setConstant(n, -1.);
// do the computation
info = ei_hybrd1(hybrd_functor(), x, fvec);
hybrd_functor functor;
HybridNonLinearSolver <hybrd_functor,double> solver(functor);
info = solver.solve(x, fvec);
// check return value
VERIFY( 1 == info);
@@ -382,7 +384,9 @@ void testHybrd()
diag.setConstant(n, 1.);
// do the computation
info = ei_hybrd(hybrd_functor(), x,fvec, nfev, fjac, R, qtf, diag, mode, ml, mu);
hybrd_functor functor;
HybridNonLinearSolver <hybrd_functor,double> solver(functor);
info = solver.solve(x,fvec, nfev, fjac, R, qtf, diag, mode, ml, mu);
// check return value
VERIFY( 1 == info);