org.apache.commons.math.optimization.general
Class LevenbergMarquardtOptimizerTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.math.optimization.general.LevenbergMarquardtOptimizerTest
All Implemented Interfaces:
junit.framework.Test

public class LevenbergMarquardtOptimizerTest
extends junit.framework.TestCase

Some of the unit tests are re-implementations of the MINPACK file17 and file22 test files. The redistribution policy for MINPACK is available here, for convenience, it is reproduced below.

Minpack Copyright Notice (1999) University of Chicago. All rights reserved
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: This product includes software developed by the University of Chicago, as Operator of Argonne National Laboratory. Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear.
  4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE CORRECTED.
  5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES.

    Author:
    Argonne National Laboratory. MINPACK project. March 1980 (original fortran minpack tests), Burton S. Garbow (original fortran minpack tests), Kenneth E. Hillstrom (original fortran minpack tests), Jorge J. More (original fortran minpack tests), Luc Maisonobe (non-minpack tests and minpack tests Java translation)

    Constructor Summary
    LevenbergMarquardtOptimizerTest(String name)
               
     
    Method Summary
    static junit.framework.Test suite()
               
     void testCircleFitting()
               
     void testCircleFittingBadInit()
               
     void testControlParameters()
               
     void testIllConditioned()
               
     void testInconsistentEquations()
               
     void testInconsistentSizes()
               
     void testMath199()
               
     void testMoreEstimatedParametersSimple()
               
     void testMoreEstimatedParametersUnsorted()
               
     void testNoDependency()
               
     void testNonInversible()
               
     void testOneSet()
               
     void testQRColumnsPermutation()
               
     void testRedundantEquations()
               
     void testTrivial()
               
     void testTwoSets()
               
     
    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

    LevenbergMarquardtOptimizerTest

    public LevenbergMarquardtOptimizerTest(String name)
    Method Detail

    testTrivial

    public void testTrivial()
                     throws org.apache.commons.math.FunctionEvaluationException,
                            org.apache.commons.math.optimization.OptimizationException
    Throws:
    org.apache.commons.math.FunctionEvaluationException
    org.apache.commons.math.optimization.OptimizationException

    testQRColumnsPermutation

    public void testQRColumnsPermutation()
                                  throws org.apache.commons.math.FunctionEvaluationException,
                                         org.apache.commons.math.optimization.OptimizationException
    Throws:
    org.apache.commons.math.FunctionEvaluationException
    org.apache.commons.math.optimization.OptimizationException

    testNoDependency

    public void testNoDependency()
                          throws org.apache.commons.math.FunctionEvaluationException,
                                 org.apache.commons.math.optimization.OptimizationException
    Throws:
    org.apache.commons.math.FunctionEvaluationException
    org.apache.commons.math.optimization.OptimizationException

    testOneSet

    public void testOneSet()
                    throws org.apache.commons.math.FunctionEvaluationException,
                           org.apache.commons.math.optimization.OptimizationException
    Throws:
    org.apache.commons.math.FunctionEvaluationException
    org.apache.commons.math.optimization.OptimizationException

    testTwoSets

    public void testTwoSets()
                     throws org.apache.commons.math.FunctionEvaluationException,
                            org.apache.commons.math.optimization.OptimizationException
    Throws:
    org.apache.commons.math.FunctionEvaluationException
    org.apache.commons.math.optimization.OptimizationException

    testNonInversible

    public void testNonInversible()
                           throws org.apache.commons.math.FunctionEvaluationException,
                                  org.apache.commons.math.optimization.OptimizationException
    Throws:
    org.apache.commons.math.FunctionEvaluationException
    org.apache.commons.math.optimization.OptimizationException

    testIllConditioned

    public void testIllConditioned()
                            throws org.apache.commons.math.FunctionEvaluationException,
                                   org.apache.commons.math.optimization.OptimizationException
    Throws:
    org.apache.commons.math.FunctionEvaluationException
    org.apache.commons.math.optimization.OptimizationException

    testMoreEstimatedParametersSimple

    public void testMoreEstimatedParametersSimple()
                                           throws org.apache.commons.math.FunctionEvaluationException,
                                                  org.apache.commons.math.optimization.OptimizationException
    Throws:
    org.apache.commons.math.FunctionEvaluationException
    org.apache.commons.math.optimization.OptimizationException

    testMoreEstimatedParametersUnsorted

    public void testMoreEstimatedParametersUnsorted()
                                             throws org.apache.commons.math.FunctionEvaluationException,
                                                    org.apache.commons.math.optimization.OptimizationException
    Throws:
    org.apache.commons.math.FunctionEvaluationException
    org.apache.commons.math.optimization.OptimizationException

    testRedundantEquations

    public void testRedundantEquations()
                                throws org.apache.commons.math.FunctionEvaluationException,
                                       org.apache.commons.math.optimization.OptimizationException
    Throws:
    org.apache.commons.math.FunctionEvaluationException
    org.apache.commons.math.optimization.OptimizationException

    testInconsistentEquations

    public void testInconsistentEquations()
                                   throws org.apache.commons.math.FunctionEvaluationException,
                                          org.apache.commons.math.optimization.OptimizationException
    Throws:
    org.apache.commons.math.FunctionEvaluationException
    org.apache.commons.math.optimization.OptimizationException

    testInconsistentSizes

    public void testInconsistentSizes()
                               throws org.apache.commons.math.FunctionEvaluationException,
                                      org.apache.commons.math.optimization.OptimizationException
    Throws:
    org.apache.commons.math.FunctionEvaluationException
    org.apache.commons.math.optimization.OptimizationException

    testControlParameters

    public void testControlParameters()

    testCircleFitting

    public void testCircleFitting()
                           throws org.apache.commons.math.FunctionEvaluationException,
                                  org.apache.commons.math.optimization.OptimizationException
    Throws:
    org.apache.commons.math.FunctionEvaluationException
    org.apache.commons.math.optimization.OptimizationException

    testCircleFittingBadInit

    public void testCircleFittingBadInit()
                                  throws org.apache.commons.math.FunctionEvaluationException,
                                         org.apache.commons.math.optimization.OptimizationException
    Throws:
    org.apache.commons.math.FunctionEvaluationException
    org.apache.commons.math.optimization.OptimizationException

    testMath199

    public void testMath199()
                     throws org.apache.commons.math.FunctionEvaluationException
    Throws:
    org.apache.commons.math.FunctionEvaluationException

    suite

    public static junit.framework.Test suite()


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