Class NevilleInterpolator
java.lang.Object
org.hipparchus.analysis.interpolation.NevilleInterpolator
- All Implemented Interfaces:
Serializable
,UnivariateInterpolator
Implements the
Neville's Algorithm for interpolation of real univariate functions. For
reference, see Introduction to Numerical Analysis, ISBN 038795452X,
chapter 2.
The actual code of Neville's algorithm is in PolynomialFunctionLagrangeForm, this class provides an easy-to-use interface to it.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioninterpolate
(double[] x, double[] y) Computes an interpolating function for the data set.
-
Constructor Details
-
NevilleInterpolator
public NevilleInterpolator()Empty constructor.This constructor is not strictly necessary, but it prevents spurious javadoc warnings with JDK 18 and later.
- Since:
- 3.0
-
-
Method Details
-
interpolate
public PolynomialFunctionLagrangeForm interpolate(double[] x, double[] y) throws MathIllegalArgumentException Computes an interpolating function for the data set.- Specified by:
interpolate
in interfaceUnivariateInterpolator
- Parameters:
x
- Interpolating points.y
- Interpolating values.- Returns:
- a function which interpolates the data set
- Throws:
MathIllegalArgumentException
- if the array lengths are different.MathIllegalArgumentException
- if the number of points is less than 2.MathIllegalArgumentException
- if two abscissae have the same value.
-