Class CosineWave

All Implemented Interfaces:
DataSet

public class CosineWave extends FunctionDataCurve
A CosineWave describes points along a sine wave of f(x) = a*sin(jx).
Author:
Jacob M. Litman
  • Constructor Details

    • CosineWave

      public CosineWave(double[] x, double a, double n)
      Constructs f(x) = a*cos(nx).
      Parameters:
      x - an array of
      invalid reference
      double
      objects.
      a - the magnitude.
      n - the periodicity.
    • CosineWave

      public CosineWave(double[] x, boolean halfWidthEnds, double a, double n)
      Constructs f(x) = a*cos(nx).
      Parameters:
      x - an array of
      invalid reference
      double
      objects.
      halfWidthEnds - Use half-width start and end bins.
      a - the magnitude.
      n - the periodicity.
  • Method Details

    • fX

      public double fX(double x)
      Evaluates the function at x.
      Specified by:
      fX in class FunctionDataCurve
      Parameters:
      x - x
      Returns:
      f(x)
    • integralAt

      public double integralAt(double x)
      Analytical integral at a point.
      Specified by:
      integralAt in class FunctionDataCurve
      Parameters:
      x - Point
      Returns:
      Exact finite integral of 0 to this point
    • toString

      public String toString()
      Overrides:
      toString in class FunctionDataCurve