Class CompositeCurve

java.lang.Object
ffx.numerics.integrate.FunctionDataCurve
ffx.numerics.integrate.CompositeCurve
All Implemented Interfaces:
DataSet

public class CompositeCurve extends FunctionDataCurve
A CompositeCurve represents points along a sum of functions which also extend FunctionDataCurve.
Author:
Jacob M. Litman
  • Constructor Details

    • CompositeCurve

      public CompositeCurve(List<FunctionDataCurve> componentCurves, @Nullable List<Double> coefficients)
      Constructs a CompositeCurve that aggregates multiple FunctionDataCurves with variable weights to each component FunctionDataCurve.
      Parameters:
      componentCurves - Underlying FunctionDataCurves
      coefficients - Weight to each component curve
  • 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)
    • getSubCurves

      public List<FunctionDataCurve> 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 class FunctionDataCurve
      Parameters:
      x - Point
      Returns:
      Exact finite integral of 0 to this point
    • toString

      public String toString()
      Overrides:
      toString in class FunctionDataCurve