Hello. > > I am trying to port my program from commons-math 2.2 to commons-math 3.0. > > I have several routines that require solvers implementing the > interface UnivariateRealSolver. > > Solvers instance used in the program are BrentSolver, BisectionSolver, > SecantSolver, NewtonSolver... > > Most of solvers in 3.0 now implement UnivariateSolver. However > NewtonSolver does not. > The only relevant common interface between NewtonSolver and the other > solvers is BaseUnivariateSolver<UnivariateFunction>.
"NewtonSolver" implements BaseUnivariateSolver<DifferentiableUnivariateFunction> not BaseUnivariateSolver<UnivariateFunction> > However according to the API documentation, this is an internal > interface that should not be used outside the library iself. > > What is the correct way to do this? You cannot use "NewtonSolver" as a "UnivariateRealSolver" because that algorithm requires the function to be differentiable. Hence there exists a "DifferentiableUnivariateSolver" interface which is implemented by "NewtonSolver". HTH, Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
