You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2015/11/03 21:37:12 UTC

[6/7] [math] Added missing braces.

Added missing braces.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/5f3d0d79
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/5f3d0d79
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/5f3d0d79

Branch: refs/heads/MATH_3_X
Commit: 5f3d0d79231c4c7932c25e6f987a1bfa738350d8
Parents: 85dd630
Author: Luc Maisonobe <lu...@apache.org>
Authored: Tue Nov 3 20:58:05 2015 +0100
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Tue Nov 3 20:58:05 2015 +0100

----------------------------------------------------------------------
 .../optim/nonlinear/scalar/noderiv/BOBYQAOptimizer.java   | 10 ++++++----
 .../math3/optimization/direct/BOBYQAOptimizer.java        | 10 ++++++----
 2 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/5f3d0d79/src/main/java/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizer.java b/src/main/java/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizer.java
index 78d5ea7..e5bf39f 100644
--- a/src/main/java/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizer.java
+++ b/src/main/java/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizer.java
@@ -1,4 +1,3 @@
-// CHECKSTYLE: stop all
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -15,6 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+// CHECKSTYLE: stop all
 package org.apache.commons.math3.optim.nonlinear.scalar.noderiv;
 
 import org.apache.commons.math3.exception.MathIllegalStateException;
@@ -448,7 +448,8 @@ public class BOBYQAOptimizer
         // call of RESCUE that makes a call of CALFUN.
 
         int state = 20;
-        for(;;) switch (state) {
+        for(;;) {
+        switch (state) {
         case 20: {
             printState(20); // XXX
             if (trustRegionCenterInterpolationPointIndex != kbase) {
@@ -833,8 +834,9 @@ public class BOBYQAOptimizer
 
             f = computeObjectiveValue(currentBest.toArray());
 
-            if (!isMinimize)
+            if (!isMinimize) {
                 f = -f;
+            }
             if (ntrits == -1) {
                 fsave = f;
                 state = 720; break;
@@ -1223,7 +1225,7 @@ public class BOBYQAOptimizer
         }
         default: {
             throw new MathIllegalStateException(LocalizedFormats.SIMPLE_MESSAGE, "bobyqb");
-        }}
+        }}}
     } // bobyqb
 
     // ----------------------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-math/blob/5f3d0d79/src/main/java/org/apache/commons/math3/optimization/direct/BOBYQAOptimizer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/optimization/direct/BOBYQAOptimizer.java b/src/main/java/org/apache/commons/math3/optimization/direct/BOBYQAOptimizer.java
index b05c3ff..78d2d2c 100644
--- a/src/main/java/org/apache/commons/math3/optimization/direct/BOBYQAOptimizer.java
+++ b/src/main/java/org/apache/commons/math3/optimization/direct/BOBYQAOptimizer.java
@@ -1,4 +1,3 @@
-// CHECKSTYLE: stop all
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +15,7 @@
  * limitations under the License.
  */
 
+// CHECKSTYLE: stop all
 package org.apache.commons.math3.optimization.direct;
 
 import org.apache.commons.math3.analysis.MultivariateFunction;
@@ -453,7 +453,8 @@ public class BOBYQAOptimizer
         // call of RESCUE that makes a call of CALFUN.
 
         int state = 20;
-        for(;;) switch (state) {
+        for(;;) {
+        switch (state) {
         case 20: {
             printState(20); // XXX
             if (trustRegionCenterInterpolationPointIndex != kbase) {
@@ -838,8 +839,9 @@ public class BOBYQAOptimizer
 
             f = computeObjectiveValue(currentBest.toArray());
 
-            if (!isMinimize)
+            if (!isMinimize) {
                 f = -f;
+            }
             if (ntrits == -1) {
                 fsave = f;
                 state = 720; break;
@@ -1228,7 +1230,7 @@ public class BOBYQAOptimizer
         }
         default: {
             throw new MathIllegalStateException(LocalizedFormats.SIMPLE_MESSAGE, "bobyqb");
-        }}
+        }}}
     } // bobyqb
 
     // ----------------------------------------------------------------------------------------