InputType
- Class of the input to the EvaluatorOutputType
- Class of the output from the EvaluatorDerivativeType
- Class of the derivative of the Evaluator@PublicationReference(author="Wikipedia", title="Numerical differentiation", type=WebPage, url="http://en.wikipedia.org/wiki/Numerical_differentiation", year=2008) public abstract class NumericalDifferentiator<InputType,OutputType,DerivativeType> extends AbstractCloneableSerializable implements DifferentiableEvaluator<InputType,OutputType,DerivativeType>
Modifier and Type | Class and Description |
---|---|
static class |
NumericalDifferentiator.DoubleJacobian
Numerical differentiator based on a Vector Jacobian.
|
static class |
NumericalDifferentiator.MatrixJacobian
Numerical differentiator based on a Matrix Jacobian.
|
static class |
NumericalDifferentiator.VectorJacobian
Numerical differentiator based on a Vector Jacobian.
|
Constructor and Description |
---|
NumericalDifferentiator(Evaluator<? super InputType,OutputType> internalFunction,
double delta)
Creates a new instance of NumericalDifferentiator
|
Modifier and Type | Method and Description |
---|---|
NumericalDifferentiator<InputType,OutputType,DerivativeType> |
clone()
This makes public the clone method on the
Object class and
removes the exception that it throws. |
OutputType |
evaluate(InputType input)
Evaluates the function on the given input and returns the output.
|
double |
getDelta()
Getter for delta
|
Evaluator<? super InputType,OutputType> |
getInternalFunction()
Getter for internalFunction
|
void |
setDelta(double delta)
Setter for delta
|
void |
setInternalFunction(Evaluator<? super InputType,OutputType> internalFunction)
Setter for internalFunction
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
differentiate
public NumericalDifferentiator(Evaluator<? super InputType,OutputType> internalFunction, double delta)
internalFunction
- Internal function to numerically differencing.delta
- Value for x-value differencing, must be greater than 0.0public NumericalDifferentiator<InputType,OutputType,DerivativeType> clone()
AbstractCloneableSerializable
Object
class and
removes the exception that it throws. Its default behavior is to
automatically create a clone of the exact type of object that the
clone is called on and to copy all primitives but to keep all references,
which means it is a shallow copy.
Extensions of this class may want to override this method (but call
super.clone()
to implement a "smart copy". That is, to target
the most common use case for creating a copy of the object. Because of
the default behavior being a shallow copy, extending classes only need
to handle fields that need to have a deeper copy (or those that need to
be reset). Some of the methods in ObjectUtil
may be helpful in
implementing a custom clone method.
Note: The contract of this method is that you must use
super.clone()
as the basis for your implementation.clone
in interface CloneableSerializable
clone
in class AbstractCloneableSerializable
public Evaluator<? super InputType,OutputType> getInternalFunction()
public void setInternalFunction(Evaluator<? super InputType,OutputType> internalFunction)
internalFunction
- Internal function to numerically differencing.public double getDelta()
public void setDelta(double delta)
delta
- Value for x-value differencing, must be greater than 0.0public OutputType evaluate(InputType input)
Evaluator
evaluate
in interface Evaluator<InputType,OutputType>
input
- The input to evaluate.