Top Description Fields Constructors Methods
org.apache.commons.math3.analysis.interpolation

public Class NevilleInterpolator

extends Object
implements UnivariateInterpolator, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.apache.commons.math3.analysis.interpolation.UnivariateInterpolator
Imports
java.io.Serializable, org.apache.commons.math3.analysis.polynomials.PolynomialFunctionLagrangeForm, org.apache.commons.math3.exception.DimensionMismatchException, .NumberIsTooSmallException, .NonMonotonicSequenceException

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

Field Summary

Modifier and TypeField and Description
pack-priv static final long
serialVersionUID

serializable version identifier

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public PolynomialFunctionLagrangeForm

Returns:

a function which interpolates the data set
interpolate
(double[]
Interpolating points.
x
,
double[]
Interpolating values.
y
)

Implements org.apache.commons.math3.analysis.interpolation.UnivariateInterpolator.interpolate.

Computes an interpolating function for the data set.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

serializable version identifier

Constructor Detail

NevilleInterpolatorback to summary
public NevilleInterpolator()

Method Detail

interpolateback to summary
public PolynomialFunctionLagrangeForm interpolate(double[] x, double[] y) throws DimensionMismatchException, NumberIsTooSmallException, NonMonotonicSequenceException

Implements org.apache.commons.math3.analysis.interpolation.UnivariateInterpolator.interpolate.

Computes an interpolating function for the data set.

Parameters
x:double[]

Interpolating points.

y:double[]

Interpolating values.

Returns:PolynomialFunctionLagrangeForm

a function which interpolates the data set

Exceptions
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.