commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1056412 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization: BaseMultiStartMultivariateRealOptimizer.java BaseMultiStartMultivariateVectorialOptimizer.java
Date Fri, 07 Jan 2011 17:47:14 GMT
Author: sebb
Date: Fri Jan  7 17:47:14 2011
New Revision: 1056412

URL: http://svn.apache.org/viewvc?rev=1056412&view=rev
Log:
MATH-466 - update Javadoc

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateRealOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateRealOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateRealOptimizer.java?rev=1056412&r1=1056411&r2=1056412&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateRealOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateRealOptimizer.java
Fri Jan  7 17:47:14 2011
@@ -60,7 +60,8 @@ public class BaseMultiStartMultivariateR
      * Create a multi-start optimizer from a single-start optimizer.
      *
      * @param optimizer Single-start optimizer to wrap.
-     * @param starts Number of starts to perform.
+     * @param starts Number of starts to perform, must be >=1. 
+     * Multi-start is disabled if {@code starts == 1}.
      * @param generator Random vector generator to use for restarts.
      * @throws NullArgumentException if {@code optimizer} or {@code generator}
      * is {@code null}.
@@ -162,7 +163,7 @@ public class BaseMultiStartMultivariateR
         sortPairs(goal);
 
         if (optima[0] == null) {
-            throw lastException;
+            throw lastException; // cannot be null if starts >=1
         }
 
         // Return the found point given the best objective function value.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java?rev=1056412&r1=1056411&r2=1056412&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java
Fri Jan  7 17:47:14 2011
@@ -60,7 +60,8 @@ public class BaseMultiStartMultivariateV
      * Create a multi-start optimizer from a single-start optimizer.
      *
      * @param optimizer Single-start optimizer to wrap.
-     * @param starts Number of starts to perform.
+     * @param starts Number of starts to perform, must be >=1. 
+     * Multi-start is disabled if {@code starts == 1}.
      * @param generator Random vector generator to use for restarts.
      * @throws NullArgumentException if {@code optimizer} or {@code generator}
      * is {@code null}.
@@ -166,7 +167,7 @@ public class BaseMultiStartMultivariateV
         sortPairs(target, weights);
 
         if (optima[0] == null) {
-            throw lastException;
+            throw lastException; // cannot be null if starts >=1
         }
 
         // Return the found point given the best objective function value.



Mime
View raw message