public class AkimaSplineInterpolator extends Object implements UnivariateInterpolator
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
.
Constructor and Description |
---|
AkimaSplineInterpolator() |
Modifier and Type | Method and Description |
---|---|
PolynomialSplineFunction |
interpolate(double[] xvals,
double[] yvals)
Computes an interpolating function for the data set.
|
public PolynomialSplineFunction interpolate(double[] xvals, double[] yvals) throws MathIllegalArgumentException
interpolate
in interface UnivariateInterpolator
xvals
- the arguments for the interpolation pointsyvals
- the values for the interpolation pointsMathIllegalArgumentException
- if xvals
and yvals
have
different sizes.MathIllegalArgumentException
- if xvals
is not sorted in
strict increasing order.MathIllegalArgumentException
- if the size of xvals
is smaller
than 5.Copyright © 2016 Hipparchus.org. All rights reserved.