public static class NumericallyDifferentiableFunction.NumericalDerivative extends java.lang.Object implements Function
Constructor and Description |
---|
NumericallyDifferentiableFunction.NumericalDerivative(Function function,
int derivativeDimension,
float delta) |
Modifier and Type | Method and Description |
---|---|
Function |
clone() |
float |
getDelta() |
int |
getDerivativeDimension() |
int |
getDimension() |
Function |
getFunction() |
float |
map(float[] from) |
float[] |
multiMap(float[][] from) |
void |
setDelta(float delta) |
void |
setDerivativeDimension(int dim) |
public NumericallyDifferentiableFunction.NumericalDerivative(Function function, int derivativeDimension, float delta)
function
- The Function of which the derivative is to be approximatedderivativeDimension
- The dimension along which the derivative is to be calculateddelta
- Derivative approximation of f(x) is [f(x+delta)-f(x-delta)]/[2*delta]public int getDimension()
getDimension
in interface Function
Function.getDimension()
public Function getFunction()
public int getDerivativeDimension()
public void setDerivativeDimension(int dim)
dim
- The dimension along which the derivative is to be calculatedpublic float getDelta()
public void setDelta(float delta)
delta
- The variable delta in derivative approximation [f(x+delta)-f(x-delta)]/[2*delta]public float map(float[] from)
map
in interface Function
from
- Must have same length as getDimension()Function.map(float[])
public float[] multiMap(float[][] from)
multiMap
in interface Function
from
- An array of arguments; each element must have length getDimension().Function.multiMap(float[][])