org.opensourcephysics.cabrillo.tracker
Class FirstDerivative

java.lang.Object
  extended by org.opensourcephysics.cabrillo.tracker.FirstDerivative
All Implemented Interfaces:
Derivative

public class FirstDerivative
extends java.lang.Object
implements Derivative

This implements an algorithm for finding a first derivative.

Author:
Douglas Brown

Constructor Summary
FirstDerivative()
           
 
Method Summary
 java.lang.Object[] evaluate(java.lang.Object[] data)
          Evaluates the derivative.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FirstDerivative

public FirstDerivative()
Method Detail

evaluate

public java.lang.Object[] evaluate(java.lang.Object[] data)
Evaluates the derivative. 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] = xDeriv (double[]) (invalid values are NaN) result[1] = yDeriv (double[]) (invalid values are NaN) result[2] = null result[3] = null

Specified by:
evaluate in interface Derivative
Parameters:
data - the input data
Returns:
Object[] the result