Class SinWave

All Implemented Interfaces:
DataSet

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

    • SinWave

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

      public SinWave(double[] x, boolean halfWidthEnds, double a, double n)
      Constructs f(x) = a*sin(nx).
      Parameters:
      x - an array of
      invalid reference
      double
      objects.
      halfWidthEnds - Use half-width start and end bins.
      a - magnitude.
      n - 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