Class NevilleInterpolator
- java.lang.Object
-
- org.apache.commons.math4.legacy.analysis.interpolation.NevilleInterpolator
-
- All Implemented Interfaces:
UnivariateInterpolator
public class NevilleInterpolator extends Object implements 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.
- Since:
- 1.2
-
-
Constructor Summary
Constructors Constructor Description NevilleInterpolator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PolynomialFunctionLagrangeForm
interpolate(double[] x, double[] y)
Computes an interpolating function for the data set.
-
-
-
Constructor Detail
-
NevilleInterpolator
public NevilleInterpolator()
-
-
Method Detail
-
interpolate
public PolynomialFunctionLagrangeForm interpolate(double[] x, double[] y) throws DimensionMismatchException, NumberIsTooSmallException, NonMonotonicSequenceException
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:
DimensionMismatchException
- if the array lengths are different.NumberIsTooSmallException
- if the number of points is less than 2.NonMonotonicSequenceException
- if two abscissae have the same value.
-
-