public interface Uniroot
uniroot
.Modifier and Type | Method and Description |
---|---|
double |
solve(UnivariateRealFunction f,
double lower,
double upper,
double... guess)
Search for a root, x, in the interval [lower, upper] such that f(x) = 0.
|
double solve(UnivariateRealFunction f, double lower, double upper, double... guess) throws NoRootFoundException
f
- a univariate functionlower
- the lower bound of the bracketing intervalupper
- the upper bound of the bracketing intervalguess
- an initial guess of the root within [lower, upper].
Note that guess
is a 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 rootCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.