org.apache.commons.math.analysis.polynomials
Class PolynomialFunctionLagrangeFormTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.math.analysis.polynomials.PolynomialFunctionLagrangeFormTest
All Implemented Interfaces:
junit.framework.Test

public final class PolynomialFunctionLagrangeFormTest
extends junit.framework.TestCase

Testcase for Lagrange form of polynomial function.

We use n+1 points to interpolate a polynomial of degree n. This should give us the exact same polynomial as result. Thus we can use a very small tolerance to account only for round-off errors.

Version:
$Revision: 799857 $ $Date: 2009-08-01 09:07:12 -0400 (Sat, 01 Aug 2009) $

Constructor Summary
PolynomialFunctionLagrangeFormTest()
           
 
Method Summary
 void testLinearFunction()
          Test of polynomial for the linear function.
 void testParameters()
          Test of parameters for the polynomial.
 void testQuadraticFunction()
          Test of polynomial for the quadratic function.
 void testQuinticFunction()
          Test of polynomial for the quintic 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

PolynomialFunctionLagrangeFormTest

public PolynomialFunctionLagrangeFormTest()
Method Detail

testLinearFunction

public void testLinearFunction()
                        throws org.apache.commons.math.MathException
Test of polynomial for the linear function.

Throws:
org.apache.commons.math.MathException

testQuadraticFunction

public void testQuadraticFunction()
                           throws org.apache.commons.math.MathException
Test of polynomial for the quadratic function.

Throws:
org.apache.commons.math.MathException

testQuinticFunction

public void testQuinticFunction()
                         throws org.apache.commons.math.MathException
Test of polynomial for the quintic function.

Throws:
org.apache.commons.math.MathException

testParameters

public void testParameters()
                    throws Exception
Test of parameters for the polynomial.

Throws:
Exception


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.