commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <Luc.Maison...@free.fr>
Subject Re: svn commit: r980032 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/ main/java/org/apache/commons/math/optimization/univariate/ test/java/org/apache/commons/math/optimization/ test/java/org/apache/commons/math/optimization/univar...
Date Wed, 28 Jul 2010 12:19:40 GMT
Le 28/07/2010 14:03, erans@apache.org a écrit :
> Author: erans
> Date: Wed Jul 28 12:03:41 2010
> New Revision: 980032
> 
> URL: http://svn.apache.org/viewvc?rev=980032&view=rev
> Log:
> MATH-395: Another bug uncovered; all things being equal, the code now behaves
> like the Puthon implementation.
> MATH-397: Modified "BrentOptimizer" following the changes in
> "AbstractUnivariateRealOptimizer".
> 
> Modified:
>     commons/proper/math/trunk/src/main/java/org/apache/commons/math/ConvergingAlgorithmImpl.java
>     commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/AbstractUnivariateRealOptimizer.java
>     commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java
>     commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizerTest.java
>     commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/univariate/BrentOptimizerTest.java

[snip]

>       */
> -    private double localMin(UnivariateRealFunction f,
> -                            GoalType goalType,
> +    private double localMin(boolean isMinim,
>                              double lo, double mid, double hi,
>                              double eps, double t)

Perhaps we should change this method name to localExtremum ? It seems we
forgot to do that earlier despite the method was able to either minimize
or maximize a function.

[snip]

> Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizerTest.java
> URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizerTest.java?rev=980032&r1=980031&r2=980032&view=diff
> ==============================================================================
> --- commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizerTest.java
(original)
> +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizerTest.java
Wed Jul 28 12:03:41 2010
> @@ -48,8 +48,8 @@ public class MultiStartUnivariateRealOpt
>              assertEquals(-1.0, f.value(optima[i]), 1.0e-10);
>              assertEquals(f.value(optima[i]), optimaValues[i], 1.0e-10);
>          }
> -        assertTrue(minimizer.getEvaluations() > 1500);
> -        assertTrue(minimizer.getEvaluations() < 1700);
> +        assertTrue(minimizer.getEvaluations() > 150);
> +        assertTrue(minimizer.getEvaluations() < 250);

Wow ! These are impressive improvements.
Many thanks for these.

Luc

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message