public class CsAkima extends Spline
Class CsAkima
computes a C1 cubic spline interpolant
to a set of data points (xi,fi) for i=0,…,n−1. The breakpoints of the spline are the abscissas.
Endpoint conditions are automatically determined by the program; see Akima
(1970) or de Boor (1978).
If the data points arise from the values of a smooth, say C4, function f, i.e. fi=f(xi), then the error will behave in a predictable fashion. Let ξ be the breakpoint vector for the above spline interpolant. Then, the maximum absolute error satisfies
‖
where
|\xi| \;: = \max\limits_{i = 1,\ldots,n-1} |\xi_i -\xi_{i-1}|
CsAkima
is based on a method by Akima (1970) to combat
wiggles in the interpolant. The method is nonlinear; and although the
interpolant is a piecewise cubic, cubic polynomials are not reproduced.
(However, linear polynomials are reproduced.)
breakPoint, coef, EPSILON_LARGE
Constructor and Description |
---|
CsAkima(double[] xData,
double[] yData)
Constructs the Akima cubic spline interpolant to the given
data points.
|
copyAndSortData, copyAndSortData, derivative, derivative, derivative, getBreakpoints, integral, value, value
public CsAkima(double[] xData, double[] yData)
xData
- a double
array containing the x-coordinates of the data.
Values must be distinct.yData
- a double
array containing the y-coordinates of the data.IllegalArgumentException
- This exception is thrown if
the arrays xData and yData do not have
the same length.Copyright © 2020 Rogue Wave Software. All rights reserved.