public abstract class RealSingleRootFinder extends Object implements SingleRootFinder<Double,Double>
| Constructor and Description |
|---|
RealSingleRootFinder() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkInputs(DoubleFunction1D function,
Double x1,
Double x2)
Tests that the inputs to the root-finder are not null, and that a root is bracketed by the bounding values.
|
protected void |
checkInputs(Function<Double,Double> function,
Double x1,
Double x2)
Tests that the inputs to the root-finder are not null, and that a root is bracketed by the bounding values.
|
Double |
getRoot(Function<Double,Double> function,
Double... startingPoints)
Finds the root.
|
abstract Double |
getRoot(Function<Double,Double> function,
Double x1,
Double x2) |
public Double getRoot(Function<Double,Double> function, Double... startingPoints)
SingleRootFindergetRoot in interface SingleRootFinder<Double,Double>function - the function, not nullstartingPoints - the roots, not nullprotected void checkInputs(Function<Double,Double> function, Double x1, Double x2)
function - The function, not nullx1 - The first bound, not nullx2 - The second bound, not null, must be greater than x1IllegalArgumentException - if x1 and x2 do not bracket a rootprotected void checkInputs(DoubleFunction1D function, Double x1, Double x2)
function - The function, not nullx1 - The first bound, not nullx2 - The second bound, not null, must be greater than x1IllegalArgumentException - if x1 and x2 do not bracket a rootCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.