Package ffx.numerics.integrate
Class SinWave
java.lang.Object
ffx.numerics.integrate.FunctionDataCurve
ffx.numerics.integrate.SinWave
- All Implemented Interfaces:
DataSet
A SinWave describes points along a sine wave of f(x) = a*sin(jx).
- Author:
- Jacob M. Litman
-
Field Summary
Fields inherited from class ffx.numerics.integrate.FunctionDataCurve
halfWidthEnd, lb, points, ub, x -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublefX(double x) Evaluates the function at x.doubleintegralAt(double x) Analytical integral at a point.toString()Methods inherited from class ffx.numerics.integrate.FunctionDataCurve
analyticalIntegral, analyticalIntegral, approxEquals, approxEquals, assertXIntegrity, binWidth, getAllFxPoints, getFxPoint, getX, halfWidthEnds, lowerBound, numPoints, upperBound
-
Constructor Details
-
SinWave
public SinWave(double[] x, double a, double n) Constructs f(x) = a*sin(nx).- Parameters:
x- an array of double values.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 double values.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:
fXin classFunctionDataCurve- Parameters:
x- x- Returns:
- f(x)
-
integralAt
public double integralAt(double x) Analytical integral at a point.- Specified by:
integralAtin classFunctionDataCurve- Parameters:
x- Point- Returns:
- Exact finite integral of 0 to this point
-
toString
- Overrides:
toStringin classFunctionDataCurve
-