Class FirstDerivative

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

public class FirstDerivative extends Object implements Derivative
This implements an algorithm for finding a first derivative.
Author:
Douglas Brown
  • Constructor Details

    • FirstDerivative

      public FirstDerivative()
  • Method Details

    • evaluate

      public Object[] evaluate(Object[] data)
      Evaluates the derivative. Input data: data[0] = parameters (int[] {spill, start, stepsize, count}) data[1] = xData (double[]) data[2] = yData (double[]) (may be null for 1d data) data[3] = validData (boolean[]) Returned result: result[0] = xDeriv (double[]) (invalid values are NaN) result[1] = yDeriv (double[]) (invalid values are NaN) (null if input data[2] is null) result[2] = null result[3] = null
      Specified by:
      evaluate in interface Derivative
      Parameters:
      data - the input data
      Returns:
      Object[] the result