Class BounceDerivatives

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

public class BounceDerivatives extends Object implements 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    evaluate(Object[] data)
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BounceDerivatives

      public BounceDerivatives()
  • Method Details

    • evaluate

      public Object[] evaluate(Object[] data)
      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 interface Derivative
      Parameters:
      data - the input data
      Returns:
      Object array containing the result