You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2015/03/18 22:42:53 UTC

[math] Fix sonar error: remove private final field and return the DEFAULT value instead.

Repository: commons-math
Updated Branches:
  refs/heads/master c440f668a -> a1c5a5827


Fix sonar error: remove private final field and return the DEFAULT value instead.


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

Branch: refs/heads/master
Commit: a1c5a582760c7f65572d0883fbcedc843332d7eb
Parents: c440f66
Author: Thomas Neidhart <th...@gmail.com>
Authored: Wed Mar 18 22:41:00 2015 +0100
Committer: Thomas Neidhart <th...@gmail.com>
Committed: Wed Mar 18 22:41:00 2015 +0100

----------------------------------------------------------------------
 .../commons/math4/distribution/AbstractRealDistribution.java  | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/a1c5a582/src/main/java/org/apache/commons/math4/distribution/AbstractRealDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/AbstractRealDistribution.java b/src/main/java/org/apache/commons/math4/distribution/AbstractRealDistribution.java
index 247c3de..b10e41f 100644
--- a/src/main/java/org/apache/commons/math4/distribution/AbstractRealDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/AbstractRealDistribution.java
@@ -36,7 +36,7 @@ import org.apache.commons.math4.util.FastMath;
  */
 public abstract class AbstractRealDistribution
 implements RealDistribution, Serializable {
-    /** Default accuracy. */
+    /** Default absolute accuracy for inverse cumulative computation. */
     public static final double SOLVER_DEFAULT_ABSOLUTE_ACCURACY = 1e-6;
     /** Serializable version identifier */
     private static final long serialVersionUID = -38038050983108802L;
@@ -47,9 +47,6 @@ implements RealDistribution, Serializable {
      */
     protected final RandomGenerator random;
 
-    /** Solver absolute accuracy for inverse cumulative computation */
-    private final double solverAbsoluteAccuracy = SOLVER_DEFAULT_ABSOLUTE_ACCURACY;
-
     /**
      * @param rng Random number generator.
      * @since 3.1
@@ -208,7 +205,7 @@ implements RealDistribution, Serializable {
      * @return the maximum absolute error in inverse cumulative probability estimates
      */
     protected double getSolverAbsoluteAccuracy() {
-        return solverAbsoluteAccuracy;
+        return SOLVER_DEFAULT_ABSOLUTE_ACCURACY;
     }
 
     /** {@inheritDoc} */