org.apache.commons.math3.analysis.interpolation
Class SplineInterpolatorTest

java.lang.Object
  extended by org.apache.commons.math3.analysis.interpolation.SplineInterpolatorTest

public class SplineInterpolatorTest
extends Object

Test the SplineInterpolator.

Version:
$Id: SplineInterpolatorTest.java 1364030 2012-07-21 01:10:04Z erans $

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()
           
 
Method Summary
 void testIllegalArguments()
           
 void testInterpolateLinear()
           
 void testInterpolateLinearDegenerateThreeSegment()
           
 void testInterpolateLinearDegenerateTwoSegment()
           
 void testInterpolateSin()
           
protected  void verifyConsistency(PolynomialSplineFunction f, double[] x)
          Verifies that interpolating polynomials satisfy consistency requirement: adjacent polynomials must agree through two derivatives at knot points
protected  void verifyInterpolation(UnivariateFunction 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

knotTolerance

protected double knotTolerance
error tolerance for spline interpolator value at knot points


coefficientTolerance

protected double coefficientTolerance
error tolerance for interpolating polynomial coefficients


interpolationTolerance

protected double interpolationTolerance
error tolerance for interpolated values -- high value is from sin test

Constructor Detail

SplineInterpolatorTest

public SplineInterpolatorTest()
Method Detail

testInterpolateLinearDegenerateTwoSegment

public void testInterpolateLinearDegenerateTwoSegment()

testInterpolateLinearDegenerateThreeSegment

public void testInterpolateLinearDegenerateThreeSegment()

testInterpolateLinear

public void testInterpolateLinear()

testInterpolateSin

public void testInterpolateSin()

testIllegalArguments

public void testIllegalArguments()

verifyInterpolation

protected void verifyInterpolation(UnivariateFunction f,
                                   double[] x,
                                   double[] y)
verifies that f(x[i]) = y[i] for i = 0..n-1 where n is common length.


verifyConsistency

protected void verifyConsistency(PolynomialSplineFunction f,
                                 double[] x)
Verifies that interpolating polynomials satisfy consistency requirement: adjacent polynomials must agree through two derivatives at knot points



Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.