public class ScalarSecondOrderDifferentiator extends Object implements Differentiator<Double,Double,Double>
For a function $y = f(x)$ where $x$ and $y$ are scalars, this class produces a function that returns the second derivative value for each point, i.e., $\frac{d^2 f}{dx^2}$.
| Constructor and Description |
|---|
ScalarSecondOrderDifferentiator()
Creates an instance using the default values.
|
ScalarSecondOrderDifferentiator(double eps)
Creates an instance specifying the step size.
|
| Modifier and Type | Method and Description |
|---|---|
Function<Double,Double> |
differentiate(Function<Double,Double> function)
Provides a function that performs the differentiation.
|
Function<Double,Double> |
differentiate(Function<Double,Double> function,
Function<Double,Boolean> domain)
Provides a function that performs the differentiation.
|
public ScalarSecondOrderDifferentiator()
public ScalarSecondOrderDifferentiator(double eps)
eps - the step sizepublic Function<Double,Double> differentiate(Function<Double,Double> function)
Differentiatordifferentiate in interface Differentiator<Double,Double,Double>function - a function for which to get the differential functionpublic Function<Double,Double> differentiate(Function<Double,Double> function, Function<Double,Boolean> domain)
Differentiatordifferentiate in interface Differentiator<Double,Double,Double>function - a function for which to get the differential functiondomain - a function that returns false if the requested value is not in the domain, true otherwiseCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.