org.apache.commons.math.analysis.solvers
Class BrentSolverTest

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

public final class BrentSolverTest
extends junit.framework.TestCase

Testcase for UnivariateRealSolver. Because Brent-Dekker is guaranteed to converge in less than the default maximum iteration count due to bisection fallback, it is quite hard to debug. I include measured iteration counts plus one in order to detect regressions. On average Brent-Dekker should use 4..5 iterations for the default absolute accuracy of 10E-8 for sinus and the quintic function around zero, and 5..10 iterations for the other zeros.

Version:
$Revision:670469 $ $Date:2008-06-23 10:01:38 +0200 (lun., 23 juin 2008) $

Constructor Summary
BrentSolverTest(String name)
           
 
Method Summary
static junit.framework.Test suite()
           
 void testBadEndpoints()
           
 void testDeprecated()
          Deprecated. 
 void testInitialGuess()
           
 void testQuinticZero()
           
 void testRootEndpoints()
           
 void testSinZero()
           
 
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

BrentSolverTest

public BrentSolverTest(String name)
Method Detail

suite

public static junit.framework.Test suite()

testDeprecated

@Deprecated
public void testDeprecated()
                    throws org.apache.commons.math.MathException
Deprecated. 

Throws:
org.apache.commons.math.MathException

testSinZero

public void testSinZero()
                 throws org.apache.commons.math.MathException
Throws:
org.apache.commons.math.MathException

testQuinticZero

public void testQuinticZero()
                     throws org.apache.commons.math.MathException
Throws:
org.apache.commons.math.MathException

testRootEndpoints

public void testRootEndpoints()
                       throws Exception
Throws:
Exception

testBadEndpoints

public void testBadEndpoints()
                      throws Exception
Throws:
Exception

testInitialGuess

public void testInitialGuess()
                      throws org.apache.commons.math.MathException
Throws:
org.apache.commons.math.MathException


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