org.apache.commons.math.analysis
Class LaguerreSolverTest

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

public final class LaguerreSolverTest
extends junit.framework.TestCase

Testcase for Laguerre solver.

Laguerre's method is very efficient in solving polynomials. Test runs show that for a default absolute accuracy of 1E-6, it generally takes less than 5 iterations to find one root, provided solveAll() is not invoked, and 15 to 20 iterations to find all roots for quintic function.

Version:
$Revision$ $Date$

Constructor Summary
LaguerreSolverTest()
           
 
Method Summary
 void testLinearFunction()
          Test of solver for the linear function.
 void testParameters()
          Test of parameters for the solver.
 void testQuadraticFunction()
          Test of solver for the quadratic function.
 void testQuinticFunction()
          Test of solver for the quintic function.
 void testQuinticFunction2()
          Test of solver for the quintic function using solveAll().
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LaguerreSolverTest

public LaguerreSolverTest()
Method Detail

testLinearFunction

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

Throws:
org.apache.commons.math.MathException

testQuadraticFunction

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

Throws:
org.apache.commons.math.MathException

testQuinticFunction

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

Throws:
org.apache.commons.math.MathException

testQuinticFunction2

public void testQuinticFunction2()
                          throws org.apache.commons.math.MathException
Test of solver for the quintic function using solveAll().

Throws:
org.apache.commons.math.MathException

testParameters

public void testParameters()
                    throws java.lang.Exception
Test of parameters for the solver.

Throws:
java.lang.Exception


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