org.apache.commons.math3.analysis.interpolation

## Class NevilleInterpolatorTest

• java.lang.Object
• org.apache.commons.math3.analysis.interpolation.NevilleInterpolatorTest

• public final class NevilleInterpolatorTest
extends Object
Test case for Neville interpolator.

The error of polynomial interpolation is f(z) - p(z) = f^(n)(zeta) * (z-x[0])(z-x[1])...(z-x[n-1]) / n! where f^(n) is the n-th derivative of the approximated function and zeta is some point in the interval determined by x[] and z.

Since zeta is unknown, f^(n)(zeta) cannot be calculated. But we can bound it and use the absolute value upper bound for estimates. For reference, see Introduction to Numerical Analysis, ISBN 038795452X, chapter 2.

• ### Constructor Summary

Constructors
Constructor and Description
NevilleInterpolatorTest()
• ### Method Summary

Methods
Modifier and Type Method and Description
protected double partialerror(double[] x, double z)
Returns the partial error term (z-x[0])(z-x[1])...(z-x[n-1])/n!
void testExpm1Function()
Test of interpolator for the exponential function.
void testParameters()
Test of parameters for the interpolator.
void testSinFunction()
Test of interpolator for the sine function.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### NevilleInterpolatorTest

public NevilleInterpolatorTest()
• ### Method Detail

• #### testSinFunction

public void testSinFunction()
Test of interpolator for the sine function.

|sin^(n)(zeta)| <= 1.0, zeta in [0, 2*PI]

• #### testExpm1Function

public void testExpm1Function()
Test of interpolator for the exponential function.

|expm1^(n)(zeta)| <= e, zeta in [-1, 1]

• #### testParameters

public void testParameters()
Test of parameters for the interpolator.
• #### partialerror

protected double partialerror(double[] x,
double z)
throws IllegalArgumentException
Returns the partial error term (z-x[0])(z-x[1])...(z-x[n-1])/n!
Throws:
IllegalArgumentException