| org.apache.commons.math.analysis.PolynomialSplineFunctionTest
PolynomialSplineFunctionTest | public class PolynomialSplineFunctionTest extends TestCase (Code) | | Tests the PolynomialSplineFunction implementation.
version: $Revision: 155427 $ |
Field Summary | |
protected PolynomialFunction | dp | protected double[] | knots | protected 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 |
Method Summary | |
protected int | findKnot(double[] knots, double x) Do linear search to find largest knot point less than or equal to x. | public void | testConstructor() | public void | testValues() |
knots | protected double[] knots(Code) | | Knot points
|
polynomials | protected PolynomialFunction[] polynomials(Code) | | 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.
|
tolerance | protected double tolerance(Code) | | Error tolerance for tests
|
findKnot | protected int findKnot(double[] knots, double x)(Code) | | Do linear search to find largest knot point less than or equal to x.
Implementation does binary search.
|
testConstructor | public void testConstructor()(Code) | | |
|
|