|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.commons.math.analysis.interpolation.DividedDifferenceInterpolatorTest
public final class DividedDifferenceInterpolatorTest
Testcase for Divided Difference 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 | |
---|---|
DividedDifferenceInterpolatorTest()
|
Method Summary | |
---|---|
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 junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DividedDifferenceInterpolatorTest()
Method Detail |
---|
public void testSinFunction() throws org.apache.commons.math.MathException
|sin^(n)(zeta)| <= 1.0, zeta in [0, 2*PI]
org.apache.commons.math.MathException
public void testExpm1Function() throws org.apache.commons.math.MathException
|expm1^(n)(zeta)| <= e, zeta in [-1, 1]
org.apache.commons.math.MathException
public void testParameters() throws Exception
Exception
protected double partialerror(double[] x, double z) throws IllegalArgumentException
IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |