Package cnuphys.splot.fit
Class CubicSpline
java.lang.Object
cnuphys.splot.fit.CubicSpline
- All Implemented Interfaces:
IValueGetter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObtain cubic spline for the derivative by numeric differentiationdouble[]
findRoots
(double xmin, double xmax) Find the roots of the polynomial in a rangefindXValsOfMaxima
(double xmin, double xmax) Find the xy values of the maxima of the interpolated function in a given rangedouble
value
(double x)
-
Constructor Details
-
CubicSpline
public CubicSpline(double[] x, double[] y)
-
-
Method Details
-
value
public double value(double x) - Specified by:
value
in interfaceIValueGetter
-
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 rangexmax
- the max value of the range- Returns:
- an array of roots, or
null
-
findXValsOfMaxima
Find the xy values of the maxima of the interpolated function in a given range- Parameters:
xmin
- the min value of the rangexmax
- the max value of the range- Returns:
- and array of xy values, or
null
-