public class TimeDerivativeModel
extends java.lang.Object
Constructor and Description |
---|
TimeDerivativeModel(int order,
int length)
Creates a new instance of DerivativeModel
|
Modifier and Type | Method and Description |
---|---|
void |
accumulateVector(double[] vector)
Provide new values from which to compute the derivative for this function
or process.
|
double[] |
computeDerivative(double deltaT)
Compute the derivative based on the last values passed in through
accumulateValue().
|
int |
getDerivativeOrder()
Returns the order of the derivative, e.g. 2 for a second derivative.
|
public TimeDerivativeModel(int order, int length)
order
- The order of the derivative, e.g. 2 for a second derivativelength
- Length of array of values for which the derivative will be
computed.public int getDerivativeOrder()
public void accumulateVector(double[] vector)
vector
- Array of values to use when computing derivative. Note that
the length of this parameter must equal the length provided when this
object was created, or an IllegalArgumentException will be thrown.public double[] computeDerivative(double deltaT)
deltaT
- Change in time between the last update and this oneCopyright 2004-2006 Ocean Optics, Inc. All Rights Reserved.