|
||||||||||
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.SplineInterpolatorTest
public class SplineInterpolatorTest
Test the SplineInterpolator.
Field Summary | |
---|---|
protected double |
coefficientTolerance
error tolerance for interpolating polynomial coefficients |
protected double |
interpolationTolerance
error tolerance for interpolated values -- high value is from sin test |
protected double |
knotTolerance
error tolerance for spline interpolator value at knot points |
Constructor Summary | |
---|---|
SplineInterpolatorTest(String name)
|
Method Summary | |
---|---|
static junit.framework.Test |
suite()
|
void |
testIllegalArguments()
|
void |
testInterpolateLinear()
|
void |
testInterpolateLinearDegenerateThreeSegment()
|
void |
testInterpolateLinearDegenerateTwoSegment()
|
void |
testInterpolateSin()
|
protected void |
verifyConsistency(org.apache.commons.math.analysis.polynomials.PolynomialSplineFunction f,
double[] x)
Verifies that interpolating polynomials satisfy consistency requirement: adjacent polynomials must agree through two derivatives at knot points |
protected void |
verifyInterpolation(org.apache.commons.math.analysis.UnivariateRealFunction f,
double[] x,
double[] y)
verifies that f(x[i]) = y[i] for i = 0..n-1 where n is common length. |
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 |
Field Detail |
---|
protected double knotTolerance
protected double coefficientTolerance
protected double interpolationTolerance
Constructor Detail |
---|
public SplineInterpolatorTest(String name)
Method Detail |
---|
public static junit.framework.Test suite()
public void testInterpolateLinearDegenerateTwoSegment() throws Exception
Exception
public void testInterpolateLinearDegenerateThreeSegment() throws Exception
Exception
public void testInterpolateLinear() throws Exception
Exception
public void testInterpolateSin() throws Exception
Exception
public void testIllegalArguments() throws org.apache.commons.math.MathException
org.apache.commons.math.MathException
protected void verifyInterpolation(org.apache.commons.math.analysis.UnivariateRealFunction f, double[] x, double[] y) throws Exception
Exception
protected void verifyConsistency(org.apache.commons.math.analysis.polynomials.PolynomialSplineFunction f, double[] x) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |