Class CubicSpline

java.lang.Object
cnuphys.splot.fit.CubicSpline
All Implemented Interfaces:
IValueGetter

public class CubicSpline extends Object implements IValueGetter
  • Constructor Details

    • CubicSpline

      public CubicSpline(double[] x, double[] y)
  • Method Details

    • value

      public double value(double x)
      Specified by:
      value in interface IValueGetter
    • derivative

      public CubicSpline derivative()
      Obtain cubic spline for the derivative by numeric differentiation
      Returns:
    • findRoots

      public double[] findRoots(double xmin, double xmax)
      Find the roots of the polynomial in a range
      Parameters:
      xmin - the min value of the range
      xmax - the max value of the range
      Returns:
      an array of roots, or null
    • findXValsOfMaxima

      public Point2D.Double[] findXValsOfMaxima(double xmin, double xmax)
      Find the xy values of the maxima of the interpolated function in a given range
      Parameters:
      xmin - the min value of the range
      xmax - the max value of the range
      Returns:
      and array of xy values, or null