Class BounceDerivatives
java.lang.Object
org.opensourcephysics.cabrillo.tracker.BounceDerivatives
- All Implemented Interfaces:
Derivative
This implements an algorithm for estimating both the first and second
derivatives (in 2 dimensions) from a sequence of uniformly spaced samples.
This assumes there may be spikes in the second derivative ("bounces"),
causing steps in the first derivative.
The returned result of evaluate is
result[0] = xDeriv1 (double[])
result[1] = yDeriv1 (double[])
result[2] = xDeriv2 (double[])
result[3] = yDeriv2 (double[])
Mon Oct 31 15:29:48 PDT 2011 Kevin Karplus
- Author:
- Kevin Karplus
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BounceDerivatives
public BounceDerivatives()
-
-
Method Details
-
evaluate
Evaluates two derivatives at count points (start, start+index_step, ...) (with t=0 at subscript start and t=1 at subscript start+index_step) The returned arrays are the same length and use the same subscripts as the input arrays. Input data: data[0] = parameters (int[] {spill, start, stepsize, count}) data[1] = xData (double[]) data[2] = yData (double[]) data[3] = validData (boolean[]) Returned result: result[0] = xDeriv1 (double[]) result[1] = yDeriv1 (double[]) result[2] = xDeriv2 (double[]) result[3] = yDeriv2 (double[])- Specified by:
evaluate
in interfaceDerivative
- Parameters:
data
- the input data- Returns:
- Object array containing the result
-