public class MultivariateFiniteDifference extends AbstractRealScalarFunction
Function.EvaluationException
Constructor and Description |
---|
MultivariateFiniteDifference(RealScalarFunction f,
int[] varidx)
Construct the partial derivative of a multi-variable function.
|
Modifier and Type | Method and Description |
---|---|
Double |
evaluate(Vector x)
Evaluate numerically the partial derivative of f at point x.
|
double |
evaluate(Vector x,
double h)
Evaluate numerically the partial derivative of f at point x with step size h.
|
dimensionOfDomain, dimensionOfRange
public MultivariateFiniteDifference(RealScalarFunction f, int[] varidx)
varidx = new int[]{1, 2}
means
\[
f_{x_1,x_2} = {\partial^2 \over \partial x_1 \partial x_2} = {\partial \over \partial x_2}({\partial \over \partial x_1})
\]f
- the real multivariate function to take derivative ofvaridx
- the variable indices of the derivative, counting from 1 up to the domain dimension of fpublic Double evaluate(Vector x)
x
- the point to evaluate the derivative atpublic double evaluate(Vector x, double h)
x
- the point to evaluate the derivative of f ath
- the step sizeCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.