Class ScalarSecondOrderDifferentiator
- java.lang.Object
-
- com.opengamma.strata.math.impl.differentiation.ScalarSecondOrderDifferentiator
-
- All Implemented Interfaces:
Differentiator<Double,Double,Double>
public class ScalarSecondOrderDifferentiator extends Object implements Differentiator<Double,Double,Double>
Differentiates a scalar function with respect to its argument using finite difference.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 Summary
Constructors Constructor Description ScalarSecondOrderDifferentiator()
Creates an instance using the default values.ScalarSecondOrderDifferentiator(double eps)
Creates an instance specifying the step size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
differentiate
public Function<Double,Double> differentiate(Function<Double,Double> function)
Description copied from interface:Differentiator
Provides a function that performs the differentiation.- Specified by:
differentiate
in interfaceDifferentiator<Double,Double,Double>
- Parameters:
function
- a function for which to get the differential function- Returns:
- a function that calculates the differential
-
differentiate
public Function<Double,Double> differentiate(Function<Double,Double> function, Function<Double,Boolean> domain)
Description copied from interface:Differentiator
Provides a function that performs the differentiation.- Specified by:
differentiate
in interfaceDifferentiator<Double,Double,Double>
- Parameters:
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 otherwise- Returns:
- a function that calculates the differential
-
-