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[]) result[1] = yDeriv (double[]) result[2] = validDeriv (boolean[])

Specified by:
evaluate in interface Derivative
Parameters:
data - Object array containing input data
Returns:
Object array containing the result