This is yet to be written. Any contributions will be gratefully accepted!
org.apache.commons.math.analysis.UnivariateRealSolver
provides the means to
find roots of univariate, real valued, functions. Commons-Math supports various
implementations of UnivariateRealSolver
to solve functions with differing
characteristics.
In order to use the root-finding features, first a solver object must be created. It is
encouraged that all solver object creation occurs via the org.apache.commons.math.analysis.UnivariateRealSolverFactory
class. UnivariateRealSolverFactory
is a simple factory used to create all
of the solver objects supported by Commons-Math. The typical usage of UnivariateRealSolverFactory
to create a solver object would be:
The solvers that can be instantiated via the UnivariateRealSolverFactory
are detailed below:
Solver | Factory Method | Notes on Use |
---|---|---|
Bisection | newBisectionSolver | Root must be bracketted. Linear, guaranteed convergence |
Brent | newBrentSolver | Root must be bracketted. Super-linear, guaranteed convergence |
Secant | newSecantSolver | Root must be bracketted. Super-linear, non-guaranteed convergence |
Using a solver object, roots of functions are easily found using the solve
methods. For a function f
, and two domain values, min
and
max
, solve
computes the value c
such that:
f(c) = 0.0
min <= c <= max
Along with the solve
methods, the UnivariateRealSolver
interface provides many properties to control the convergence of a solver. For the most
part, these properties should not have to change from their default values to produce
quality results. In the circumstances where changing these property values is needed, it
is easily done through getter and setter methods on UnivariateRealSolver
:
Property | Methods | Purpose |
---|---|---|
Absolute accuracy |
getAbsoluteAccuracy
resetAbsoluteAccuracy
setAbsoluteAccuracy | This is yet to be written. Any contributions will be greatfully accepted! |
Function value accuracy |
getFunctionValueAccuracy
resetFunctionValueAccuracy
setFunctionValueAccuracy | This is yet to be written. Any contributions will be greatfully accepted! |
Maximum iteration count |
getMaximumIterationCount
resetMaximumIterationCount
setMaximumIterationCount | This is yet to be written. Any contributions will be greatfully accepted! |
Relative accuracy |
getRelativeAccuracy
resetRelativeAccuracy
setRelativeAccuracy | This is yet to be written. Any contributions will be greatfully accepted! |
This is yet to be written. Any contributions will be gratefully accepted!