Package com.irurueta.numerical
Class JacobianEstimator
java.lang.Object
com.irurueta.numerical.JacobianEstimator
Class to estimate the Jacobian of a multi variate and multidimensional
function.
This class evaluates a function at very close locations of a given input
point in order to determine the Jacobian at such point.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
Constant considered as machine precision.private final MultiVariateFunctionEvaluatorListener
Listener to evaluate a multivariate function.private double[]
Internal array to hold input parameter's values. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor. -
Method Summary
Modifier and TypeMethodDescriptioncom.irurueta.algebra.Matrix
jacobian
(double[] point) Returns the Jacobian of a multivariate function at provided point.void
jacobian
(double[] point, com.irurueta.algebra.Matrix result) Sets estimated jacobian in provided result matrix of a multivariate function at provided point.
-
Field Details
-
EPS
public static final double EPSConstant considered as machine precision.- See Also:
-
listener
Listener to evaluate a multivariate function. -
xh
private double[] xhInternal array to hold input parameter's values.
-
-
Constructor Details
-
JacobianEstimator
Constructor.- Parameters:
listener
- listener to evaluate a multivariate function.
-
-
Method Details
-
jacobian
Returns the Jacobian of a multivariate function at provided point.- Parameters:
point
- input point.- Returns:
- jacobian.
- Throws:
EvaluationException
- raised if function cannot be evaluated.
-
jacobian
Sets estimated jacobian in provided result matrix of a multivariate function at provided point. This method is preferred respect to jacobian(double[]) because result matrix can be reused and hence is more memory efficient.- Parameters:
point
- input point.result
- output matrix containing estimated jacobian. This parameter must be a matrix having the same number of columns as the length of the point and the same number of rows as the number of variables returned by function evaluations.- Throws:
EvaluationException
- raised if function cannot be evaluated.IllegalArgumentException
- if size of result is not valid.
-