HalleyRoot, it does not need the derivatives of the function. Brent's algorithm is the preferred method of choice for root-finding.
|Constructor and Description|
Construct an instance of Brent's root finding algorithm.
|Modifier and Type||Method and Description|
Search for a root, x, in the interval [lower, upper] such that f(x) = 0.
public BrentRoot(double tol, int maxIterations)
tol- the convergence tolerance
maxIterations- the maximum number of iterations
public double solve(UnivariateRealFunction f, double lower, double upper, double... guess)
f- a univariate function
lower- the lower bound of the bracketing interval
upper- the upper bound of the bracketing interval
guess- an initial guess of the root within [lower, upper]. Note that
double. This signature allows multiple initial guesses for certain types of uniroot algorithms, e.g., Brent's algorithm.
public double solve(UnivariateRealFunction f, double lower, double upper)
Copyright © 2010-2016 Numerical Method Incorporation Limited. All Rights Reserved.