Class UnivariateRealSolverFactory
java.lang.Object
org.apache.commons.math.analysis.solvers.UnivariateRealSolverFactory
- Direct Known Subclasses:
UnivariateRealSolverFactoryImpl
Abstract factory class used to create
UnivariateRealSolver instances.
Solvers implementing the following algorithms are supported:
- Bisection
- Brent's method
- Secant method
newDefaultSolver().
Common usage:
SolverFactory factory = UnivariateRealSolverFactory.newInstance(); // create a Brent solver to use BrentSolver solver = factory.newBrentSolver();
-
Method Summary
Modifier and TypeMethodDescriptionabstract UnivariateRealSolverCreate a newUnivariateRealSolver.abstract UnivariateRealSolverCreate a newUnivariateRealSolver.abstract UnivariateRealSolverCreate a newUnivariateRealSolver.static UnivariateRealSolverFactoryCreate a new factory.abstract UnivariateRealSolverCreate a newUnivariateRealSolver.abstract UnivariateRealSolverCreate a newUnivariateRealSolver.
-
Method Details
-
newInstance
Create a new factory.- Returns:
- a new factory.
-
newDefaultSolver
Create a newUnivariateRealSolver. The actual solver returned is determined by the underlying factory.- Returns:
- the new solver.
-
newBisectionSolver
Create a newUnivariateRealSolver. The solver is an implementation of the bisection method.- Returns:
- the new solver.
-
newBrentSolver
Create a newUnivariateRealSolver. The solver is an implementation of the Brent method.- Returns:
- the new solver.
-
newNewtonSolver
Create a newUnivariateRealSolver. The solver is an implementation of Newton's Method.- Returns:
- the new solver.
-
newSecantSolver
Create a newUnivariateRealSolver. The solver is an implementation of the secant method.- Returns:
- the new solver.
-