Package ffx.numerics.integrate
Class CompositeCurve
java.lang.Object
ffx.numerics.integrate.FunctionDataCurve
ffx.numerics.integrate.CompositeCurve
- All Implemented Interfaces:
DataSet
A CompositeCurve represents points along a sum of functions which also extend FunctionDataCurve.
- Author:
- Jacob M. Litman
-
Field Summary
Fields inherited from class ffx.numerics.integrate.FunctionDataCurve
halfWidthEnd, lb, points, ub, x
-
Constructor Summary
ConstructorDescriptionCompositeCurve
(List<FunctionDataCurve> componentCurves, List<Double> coefficients) Constructs a CompositeCurve that aggregates multiple FunctionDataCurves with variable weights to each component FunctionDataCurve. -
Method Summary
Modifier and TypeMethodDescriptiondouble
fX
(double x) Evaluates the function at x.Gets the component FunctionDataCurves of this CompositeCurve.double[]
Gets the weights to the corresponding component curves.double
integralAt
(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
-
CompositeCurve
Constructs a CompositeCurve that aggregates multiple FunctionDataCurves with variable weights to each component FunctionDataCurve.- Parameters:
componentCurves
- Underlying FunctionDataCurvescoefficients
- Weight to each component curve
-
-
Method Details
-
fX
public double fX(double x) Evaluates the function at x.- Specified by:
fX
in classFunctionDataCurve
- Parameters:
x
- x- Returns:
- f(x)
-
getSubCurves
Gets the component FunctionDataCurves of this CompositeCurve.- Returns:
- List of component FunctionDataCurves.
-
getWeights
public double[] getWeights()Gets the weights to the corresponding component curves.- Returns:
- Constant weights
-
integralAt
public double integralAt(double x) Analytical integral at a point.- Specified by:
integralAt
in classFunctionDataCurve
- Parameters:
x
- Point- Returns:
- Exact finite integral of 0 to this point
-
toString
- Overrides:
toString
in classFunctionDataCurve
-