|Constructor and Description|
Create an instance with the tolerance for convergence and the maximum number of iterations.
|Modifier and Type||Method and Description|
Search for a root, x, in the interval [lower, upper] such that f(x) = 0.
public BisectionRoot(double tol, int maxIterations)
tol- the tolerance
maxIterations- the maximum number of iterations
public double solve(UnivariateRealFunction f, double lower, double upper, double... guess) throws NoRootFoundException
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.
NoRootFoundException- when the search fails to find a root
Copyright © 2010-2017 Numerical Method Incorporation Limited. All Rights Reserved.