org.apache.commons.math3.analysis.solvers

## Class BrentSolver

• All Implemented Interfaces:
BaseUnivariateSolver<UnivariateFunction>, UnivariateSolver

public class BrentSolver
extends AbstractUnivariateSolver
This class implements the Brent algorithm for finding zeros of real univariate functions. The function should be continuous but not necessarily smooth. The solve method returns a zero x of the function f in the given interval [a, b] to within a tolerance 6 eps abs(x) + t where eps is the relative accuracy and t is the absolute accuracy. The given interval must bracket the root.
Version:
$Id: BrentSolver.java 1379560 2012-08-31 19:40:30Z erans$
• ### Constructor Detail

• #### BrentSolver

public BrentSolver()
Construct a solver with default accuracy (1e-6).
• #### BrentSolver

public BrentSolver(double absoluteAccuracy)
Construct a solver.
Parameters:
absoluteAccuracy - Absolute accuracy.
• #### BrentSolver

public BrentSolver(double relativeAccuracy,
double absoluteAccuracy)
Construct a solver.
Parameters:
relativeAccuracy - Relative accuracy.
absoluteAccuracy - Absolute accuracy.
• #### BrentSolver

public BrentSolver(double relativeAccuracy,
double absoluteAccuracy,
double functionValueAccuracy)
Construct a solver.
Parameters:
relativeAccuracy - Relative accuracy.
absoluteAccuracy - Absolute accuracy.
functionValueAccuracy - Function value accuracy.