org.apache.commons.math3.analysis.interpolation
Class DividedDifferenceInterpolator
- java.lang.Object
-
- org.apache.commons.math3.analysis.interpolation.DividedDifferenceInterpolator
-
- All Implemented Interfaces:
- java.io.Serializable, UnivariateInterpolator
public class DividedDifferenceInterpolator extends java.lang.Object implements UnivariateInterpolator, java.io.Serializable
Implements the Divided Difference Algorithm for interpolation of real univariate functions. For reference, see Introduction to Numerical Analysis, ISBN 038795452X, chapter 2.The actual code of Neville's evaluation is in PolynomialFunctionLagrangeForm, this class provides an easy-to-use interface to it.
- Since:
- 1.2
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description DividedDifferenceInterpolator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description PolynomialFunctionNewtonForminterpolate(double[] x, double[] y)Compute an interpolating function for the dataset.
-
-
-
Method Detail
-
interpolate
public PolynomialFunctionNewtonForm interpolate(double[] x, double[] y) throws DimensionMismatchException, NumberIsTooSmallException, NonMonotonicSequenceException
Compute an interpolating function for the dataset.- Specified by:
interpolatein interfaceUnivariateInterpolator- Parameters:
x- Interpolating points array.y- Interpolating values array.- Returns:
- a function which interpolates the dataset.
- Throws:
DimensionMismatchException- if the array lengths are different.NumberIsTooSmallException- if the number of points is less than 2.NonMonotonicSequenceException- ifxis not sorted in strictly increasing order.
-
-
DMelt 3.0 © DataMelt by jWork.ORG