|
||||||||||
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.polynomials.PolynomialSplineFunctionTest
public class PolynomialSplineFunctionTest
Tests the PolynomialSplineFunction implementation.
Field Summary | |
---|---|
protected org.apache.commons.math.analysis.polynomials.PolynomialFunction |
dp
Derivative of test polynomials -- 2x + 1 |
protected double[] |
knots
Knot points |
protected org.apache.commons.math.analysis.polynomials.PolynomialFunction[] |
polynomials
Quadratic polynomials used in tests: x^2 + x [-1, 0) x^2 + x + 2 [0, 1) x^2 + x + 4 [1, 2) Defined so that evaluation using PolynomialSplineFunction evaluation algorithm agrees at knot point boundaries. |
protected double |
tolerance
Error tolerance for tests |
Constructor Summary | |
---|---|
PolynomialSplineFunctionTest()
|
Method Summary | |
---|---|
protected int |
findKnot(double[] knots,
double x)
Do linear search to find largest knot point less than or equal to x. |
void |
testConstructor()
|
void |
testValues()
|
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 tolerance
protected org.apache.commons.math.analysis.polynomials.PolynomialFunction[] polynomials
protected double[] knots
protected org.apache.commons.math.analysis.polynomials.PolynomialFunction dp
Constructor Detail |
---|
public PolynomialSplineFunctionTest()
Method Detail |
---|
public void testConstructor()
public void testValues() throws Exception
Exception
protected int findKnot(double[] knots, double x)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |