Class MatrixFieldFirstOrderDifferentiator
- java.lang.Object
-
- com.opengamma.strata.math.impl.differentiation.MatrixFieldFirstOrderDifferentiator
-
- All Implemented Interfaces:
Differentiator<DoubleArray,DoubleMatrix,DoubleMatrix[]>
public class MatrixFieldFirstOrderDifferentiator extends Object implements Differentiator<DoubleArray,DoubleMatrix,DoubleMatrix[]>
Matrix field first order differentiator.
-
-
Constructor Summary
Constructors Constructor Description MatrixFieldFirstOrderDifferentiator()
Creates an instance using the default value of eps (10-5).MatrixFieldFirstOrderDifferentiator(double eps)
Creates an instance specifying the value of eps.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Function<DoubleArray,DoubleMatrix[]>
differentiate(Function<DoubleArray,DoubleMatrix> function)
Provides a function that performs the differentiation.Function<DoubleArray,DoubleMatrix[]>
differentiate(Function<DoubleArray,DoubleMatrix> function, Function<DoubleArray,Boolean> domain)
Provides a function that performs the differentiation.
-
-
-
Constructor Detail
-
MatrixFieldFirstOrderDifferentiator
public MatrixFieldFirstOrderDifferentiator()
Creates an instance using the default value of eps (10-5).
-
MatrixFieldFirstOrderDifferentiator
public MatrixFieldFirstOrderDifferentiator(double eps)
Creates an instance specifying the value of eps.- Parameters:
eps
- the step size used to approximate the derivative
-
-
Method Detail
-
differentiate
public Function<DoubleArray,DoubleMatrix[]> differentiate(Function<DoubleArray,DoubleMatrix> function)
Description copied from interface:Differentiator
Provides a function that performs the differentiation.- Specified by:
differentiate
in interfaceDifferentiator<DoubleArray,DoubleMatrix,DoubleMatrix[]>
- Parameters:
function
- a function for which to get the differential function- Returns:
- a function that calculates the differential
-
differentiate
public Function<DoubleArray,DoubleMatrix[]> differentiate(Function<DoubleArray,DoubleMatrix> function, Function<DoubleArray,Boolean> domain)
Description copied from interface:Differentiator
Provides a function that performs the differentiation.- Specified by:
differentiate
in interfaceDifferentiator<DoubleArray,DoubleMatrix,DoubleMatrix[]>
- 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
-
-