org.apache.commons.math3.analysis.interpolation
Class NevilleInterpolator
java.lang.Object
org.apache.commons.math3.analysis.interpolation.NevilleInterpolator
- All Implemented Interfaces:
- java.io.Serializable, UnivariateInterpolator
public class NevilleInterpolator
- extends java.lang.Object
- implements UnivariateInterpolator, java.io.Serializable
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
- Version:
- $Id: NevilleInterpolator.java 1379904 2012-09-01 23:54:52Z erans $
- See Also:
- Serialized Form
Field Summary |
(package private) static long |
serialVersionUID
serializable version identifier |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
static final long serialVersionUID
- serializable version identifier
- See Also:
- Constant Field Values
NevilleInterpolator
public NevilleInterpolator()
interpolate
public PolynomialFunctionLagrangeForm interpolate(double[] x,
double[] y)
throws DimensionMismatchException,
NumberIsTooSmallException,
NonMonotonicSequenceException
- Computes an interpolating function for the data set.
- Specified by:
interpolate
in interface UnivariateInterpolator
- 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.
Copyright (c) 2003-2013 Apache Software Foundation