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 12:07:50 UTC

[1/5] [math] Updated parent pom and plugins versions to latest available.

Repository: commons-math
Updated Branches:
  refs/heads/master 8e0b98bf6 -> 1130658ba


Updated parent pom and plugins versions to latest available.

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

Branch: refs/heads/master
Commit: e8556e80e91f784167de3edd4a14ac3625b9ab8d
Parents: 8e0b98b
Author: Luc Maisonobe <lu...@apache.org>
Authored: Tue Nov 3 10:23:39 2015 +0100
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Tue Nov 3 10:23:39 2015 +0100

----------------------------------------------------------------------
 pom.xml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/e8556e80/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 81ec75f..4da8e9c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
   <parent>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-parent</artifactId>
-    <version>37</version>
+    <version>39</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.commons</groupId>
@@ -398,13 +398,13 @@
     <commons.encoding>UTF-8</commons.encoding>
     <maven.compiler.source>1.7</maven.compiler.source>
     <maven.compiler.target>1.7</maven.compiler.target>
-    <math.pmd.version>2.7.1</math.pmd.version>
-    <math.findbugs.version>3.0.1</math.findbugs.version>
-    <math.checkstyle.version>2.15</math.checkstyle.version>
-    <math.clirr.version>2.6.1</math.clirr.version>
+    <math.pmd.version>3.5</math.pmd.version>
+    <math.findbugs.version>3.0.2</math.findbugs.version>
+    <math.checkstyle.version>2.17</math.checkstyle.version>
+    <math.clirr.version>2.7</math.clirr.version>
 
     <!-- Temporary fix to support Java 8 -->
-    <commons.jacoco.version>0.7.4.201502262128</commons.jacoco.version>
+    <commons.jacoco.version>0.7.5.201505241946</commons.jacoco.version>
     <commons.jacoco.classRatio>0.96</commons.jacoco.classRatio>
     <commons.jacoco.instructionRatio>0.8</commons.jacoco.instructionRatio>
     <commons.jacoco.methodRatio>0.8</commons.jacoco.methodRatio>


[2/5] [math] Removed useless object.

Posted by lu...@apache.org.
Removed useless object.

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

Branch: refs/heads/master
Commit: f13954235fd5f2071053b17358b99a8e1dc77aeb
Parents: e8556e8
Author: Luc Maisonobe <lu...@apache.org>
Authored: Tue Nov 3 10:25:10 2015 +0100
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Tue Nov 3 10:25:10 2015 +0100

----------------------------------------------------------------------
 src/main/java/org/apache/commons/math4/dfp/DfpMath.java | 5 -----
 1 file changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/f1395423/src/main/java/org/apache/commons/math4/dfp/DfpMath.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/dfp/DfpMath.java b/src/main/java/org/apache/commons/math4/dfp/DfpMath.java
index 79c6821..c66ae2d 100644
--- a/src/main/java/org/apache/commons/math4/dfp/DfpMath.java
+++ b/src/main/java/org/apache/commons/math4/dfp/DfpMath.java
@@ -754,11 +754,6 @@ public class DfpMath {
 
         Dfp y;
         if (x.lessThan(pi.divide(4))) {
-            Dfp c[] = new Dfp[2];
-            c[0] = x;
-            c[1] = zero;
-
-            //y = sinInternal(c);
             y = sinInternal(split(x));
         } else {
             final Dfp c[] = new Dfp[2];


[3/5] [math] Avoid a false positive findbugs warning.

Posted by lu...@apache.org.
Avoid a false positive findbugs warning.

The source code tests an angle using "angle > (FastMath.PI - 1.0e-10)".
As the compiler does the subtraction of the constants directly, findbugs
complains about a "Rough value of Math.PI found: 3.141592653489793".


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

Branch: refs/heads/master
Commit: 93f8d0e237d0205febc64c43c2a77b2dc6e337df
Parents: f139542
Author: Luc Maisonobe <lu...@apache.org>
Authored: Tue Nov 3 10:34:38 2015 +0100
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Tue Nov 3 10:34:38 2015 +0100

----------------------------------------------------------------------
 findbugs-exclude-filter.xml | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/93f8d0e2/findbugs-exclude-filter.xml
----------------------------------------------------------------------
diff --git a/findbugs-exclude-filter.xml b/findbugs-exclude-filter.xml
index a99e76f..b4e8f08 100644
--- a/findbugs-exclude-filter.xml
+++ b/findbugs-exclude-filter.xml
@@ -135,6 +135,13 @@
     <Bug pattern="DLS_DEAD_LOCAL_STORE" />
   </Match>
 
+  <!-- Spurious: Findbugs confused by FastMath.PI - 1.0e-10 -->
+  <Match>
+    <Class name="org.apache.commons.math4.geometry.euclidean.threed.Plane" />
+    <Method name="isSimilarTo" params="org.apache.commons.math4.geometry.euclidean.threed.Plane" returns="boolean" />
+    <Bug pattern="CNT_ROUGH_CONSTANT_VALUE" />
+  </Match>
+
   <!-- the following expositions of internal representation are intentional and documented -->
   <Match>
     <Class name="org.apache.commons.math4.stat.regression.RegressionResults"/>


[5/5] [math] Fixed findbugs warning.

Posted by lu...@apache.org.
Fixed findbugs warning.

When defining compareTo, we should also define equals and hashcode.

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

Branch: refs/heads/master
Commit: 1130658baf7ec92ba5ea309244c8bde74f385ba9
Parents: 3f68627
Author: Luc Maisonobe <lu...@apache.org>
Authored: Tue Nov 3 10:57:42 2015 +0100
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Tue Nov 3 10:57:42 2015 +0100

----------------------------------------------------------------------
 .../commons/math4/ml/neuralnet/MapUtils.java    | 21 ++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/1130658b/src/main/java/org/apache/commons/math4/ml/neuralnet/MapUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/ml/neuralnet/MapUtils.java b/src/main/java/org/apache/commons/math4/ml/neuralnet/MapUtils.java
index eb9d627..fbf7862 100644
--- a/src/main/java/org/apache/commons/math4/ml/neuralnet/MapUtils.java
+++ b/src/main/java/org/apache/commons/math4/ml/neuralnet/MapUtils.java
@@ -17,11 +17,11 @@
 
 package org.apache.commons.math4.ml.neuralnet;
 
-import java.util.HashMap;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
-import java.util.ArrayList;
 
 import org.apache.commons.math4.exception.NoDataException;
 import org.apache.commons.math4.ml.distance.DistanceMeasure;
@@ -322,5 +322,22 @@ public class MapUtils {
         public int compareTo(PairNeuronDouble other) {
             return Double.compare(this.value, other.value);
         }
+
+        /** {@inheritDoc} */
+        @Override
+        public boolean equals(Object other) {
+            if (!(other instanceof PairNeuronDouble)) {
+                return false;
+            }
+            return Double.doubleToRawLongBits(value) ==
+                   Double.doubleToRawLongBits(((PairNeuronDouble) other).value);
+        }
+
+        /** {@inheritDoc} */
+        @Override
+        public int hashCode() {
+            return Double.valueOf(value).hashCode();
+        }
+
     }
 }


[4/5] [math] Avoid a false positive findbugs warning.

Posted by lu...@apache.org.
Avoid a false positive findbugs warning.

Findbugs is confused by constant 1.570796251296997 which is a
intentionally slightly offset from PI/2 as per Cody Waite arguments
reduction.

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

Branch: refs/heads/master
Commit: 3f68627209d6624efc714aea5a3bc8eede5abcf0
Parents: 93f8d0e
Author: Luc Maisonobe <lu...@apache.org>
Authored: Tue Nov 3 10:45:35 2015 +0100
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Tue Nov 3 10:45:35 2015 +0100

----------------------------------------------------------------------
 findbugs-exclude-filter.xml | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/3f686272/findbugs-exclude-filter.xml
----------------------------------------------------------------------
diff --git a/findbugs-exclude-filter.xml b/findbugs-exclude-filter.xml
index b4e8f08..86d0087 100644
--- a/findbugs-exclude-filter.xml
+++ b/findbugs-exclude-filter.xml
@@ -142,6 +142,14 @@
     <Bug pattern="CNT_ROUGH_CONSTANT_VALUE" />
   </Match>
 
+  <!-- Spurious: Findbugs confused by constant 1.570796251296997 which is a
+       intentionally slightly offset from PI/2 as per Cody Waite arguments reduction -->
+  <Match>
+    <Class name="org.apache.commons.math4.util.FastMath$CodyWaite" />
+    <Method name="&lt;init>" params="double" returns="void" />
+    <Bug pattern="CNT_ROUGH_CONSTANT_VALUE" />
+  </Match>
+
   <!-- the following expositions of internal representation are intentional and documented -->
   <Match>
     <Class name="org.apache.commons.math4.stat.regression.RegressionResults"/>