This implementation is based on the Akima implementation in the CubicSpline class in the Math.NET Numerics library. The method referenced is CubicSpline.InterpolateAkimaSorted
The interpolate method returns a
PolynomialSplineFunction consisting of n cubic polynomials, defined
over the subintervals determined by the x values, x[0] < x[i] ... < x[n].
The Akima algorithm requires that n >= 5.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | MINIMUM_NUMBER_POINTS
The minimum number of points that are needed to compute the function. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private double | Returns: the derivativex values to calculate the numerical derivative with xvals, double[] y values to calculate the numerical derivative with yvals, int index of the elemnt we are calculating the derivative around indexOfDifferentiation, int index of the first element to sample for the three point method indexOfFirstSample, int index of the second element to sample for the three point method indexOfSecondsample, int index of the third element to sample for the three point method indexOfThirdSample)Three point differentiation helper, modeled off of the same method in the Math.NET CubicSpline class. |
| public PolynomialSplineFunction | Returns: a function which interpolates the data setthe arguments for the interpolation points xvals, double[] the values for the interpolation points yvals)Implements org.
Deprecated
as a consequence of
PolynomialSplineFunction being deprecated.
Computes an interpolating function for the data set. |
| private PolynomialSplineFunction | Returns: polynomial that fits the functionx values for interpolation xvals, double[] y values for interpolation yvals, double[] first derivative values of the function firstDerivatives)
Deprecated
as a consequence of
PolynomialSplineFunction being deprecated.
Creates a Hermite cubic spline interpolation from the set of (x,y) value pairs and their derivatives. |
| MINIMUM_NUMBER_POINTS | back to summary |
|---|---|
| private static final int MINIMUM_NUMBER_POINTS The minimum number of points that are needed to compute the function. | |
| AkimaSplineInterpolator | back to summary |
|---|---|
| public AkimaSplineInterpolator() | |
| differentiateThreePoint | back to summary |
|---|---|
| private double differentiateThreePoint(double[] xvals, double[] yvals, int indexOfDifferentiation, int indexOfFirstSample, int indexOfSecondsample, int indexOfThirdSample) Three point differentiation helper, modeled off of the same method in the Math.NET CubicSpline class. This is used by both the Apache Math and the Math.NET Akima Cubic Spline algorithms
| |
| interpolate | back to summary |
|---|---|
| public PolynomialSplineFunction interpolate(double[] xvals, double[] yvals) throws DimensionMismatchException, NumberIsTooSmallException, NonMonotonicSequenceException Implements org. Deprecated as a consequence of Computes an interpolating function for the data set.
| |
| interpolateHermiteSorted | back to summary |
|---|---|
| private PolynomialSplineFunction interpolateHermiteSorted(double[] xvals, double[] yvals, double[] firstDerivatives)
Deprecated as a consequence of Creates a Hermite cubic spline interpolation from the set of (x,y) value pairs and their derivatives. This is modeled off of the InterpolateHermiteSorted method in the Math.NET CubicSpline class.
| |