commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject [math] Remove deprecated contructors in UniformRealDistribution.
Date Tue, 24 Feb 2015 22:39:00 GMT
Repository: commons-math
Updated Branches:
  refs/heads/master 0d3545e5f -> 96ba5ec21


Remove deprecated contructors in UniformRealDistribution.


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

Branch: refs/heads/master
Commit: 96ba5ec21669469c9345910630f7783069c5ee7f
Parents: 0d3545e
Author: Thomas Neidhart <thomas.neidhart@gmail.com>
Authored: Tue Feb 24 23:38:51 2015 +0100
Committer: Thomas Neidhart <thomas.neidhart@gmail.com>
Committed: Tue Feb 24 23:38:51 2015 +0100

----------------------------------------------------------------------
 .../distribution/UniformRealDistribution.java   | 42 --------------------
 .../RandomCirclePointGenerator.java             |  3 +-
 .../RandomStraightLinePointGenerator.java       |  3 +-
 .../jacobian/RandomCirclePointGenerator.java    |  3 +-
 .../RandomStraightLinePointGenerator.java       |  3 +-
 .../general/RandomCirclePointGenerator.java     |  3 +-
 .../RandomStraightLinePointGenerator.java       |  3 +-
 .../math4/random/EmpiricalDistributionTest.java |  5 +--
 8 files changed, 7 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/96ba5ec2/src/main/java/org/apache/commons/math4/distribution/UniformRealDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/UniformRealDistribution.java
b/src/main/java/org/apache/commons/math4/distribution/UniformRealDistribution.java
index 9079894..07b4970 100644
--- a/src/main/java/org/apache/commons/math4/distribution/UniformRealDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/UniformRealDistribution.java
@@ -32,11 +32,6 @@ import org.apache.commons.math4.random.Well19937c;
  * @since 3.0
  */
 public class UniformRealDistribution extends AbstractRealDistribution {
-    /** Default inverse cumulative probability accuracy.
-     * @deprecated as of 3.2 not used anymore, will be removed in 4.0
-     */
-    @Deprecated
-    public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY = 1e-9;
     /** Serializable version identifier. */
     private static final long serialVersionUID = 20120109L;
     /** Lower bound of this distribution (inclusive). */
@@ -80,43 +75,6 @@ public class UniformRealDistribution extends AbstractRealDistribution {
     }
 
     /**
-     * Create a uniform distribution.
-     *
-     * @param lower Lower bound of this distribution (inclusive).
-     * @param upper Upper bound of this distribution (exclusive).
-     * @param inverseCumAccuracy Inverse cumulative probability accuracy.
-     * @throws NumberIsTooLargeException if {@code lower >= upper}.
-     * @deprecated as of 3.2, inverse CDF is now calculated analytically, use
-     *             {@link #UniformRealDistribution(double, double)} instead.
-     */
-    @Deprecated
-    public UniformRealDistribution(double lower, double upper, double inverseCumAccuracy)
-        throws NumberIsTooLargeException {
-        this(new Well19937c(), lower, upper);
-    }
-
-    /**
-     * Creates a uniform distribution.
-     *
-     * @param rng Random number generator.
-     * @param lower Lower bound of this distribution (inclusive).
-     * @param upper Upper bound of this distribution (exclusive).
-     * @param inverseCumAccuracy Inverse cumulative probability accuracy.
-     * @throws NumberIsTooLargeException if {@code lower >= upper}.
-     * @since 3.1
-     * @deprecated as of 3.2, inverse CDF is now calculated analytically, use
-     *             {@link #UniformRealDistribution(RandomGenerator, double, double)}
-     *             instead.
-     */
-    @Deprecated
-    public UniformRealDistribution(RandomGenerator rng,
-                                   double lower,
-                                   double upper,
-                                   double inverseCumAccuracy){
-        this(rng, lower, upper);
-    }
-
-    /**
      * Creates a uniform distribution.
      *
      * @param rng Random number generator.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/96ba5ec2/src/test/java/org/apache/commons/math4/fitting/leastsquares/RandomCirclePointGenerator.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/fitting/leastsquares/RandomCirclePointGenerator.java
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/RandomCirclePointGenerator.java
index dc7d3fb..8bc8569 100644
--- a/src/test/java/org/apache/commons/math4/fitting/leastsquares/RandomCirclePointGenerator.java
+++ b/src/test/java/org/apache/commons/math4/fitting/leastsquares/RandomCirclePointGenerator.java
@@ -58,8 +58,7 @@ public class RandomCirclePointGenerator {
                                     NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
         cY = new NormalDistribution(rng, y, ySigma,
                                     NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
-        tP = new UniformRealDistribution(rng, 0, MathUtils.TWO_PI,
-                                         UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
+        tP = new UniformRealDistribution(rng, 0, MathUtils.TWO_PI);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-math/blob/96ba5ec2/src/test/java/org/apache/commons/math4/fitting/leastsquares/RandomStraightLinePointGenerator.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/fitting/leastsquares/RandomStraightLinePointGenerator.java
b/src/test/java/org/apache/commons/math4/fitting/leastsquares/RandomStraightLinePointGenerator.java
index 6db49bb..024f561 100644
--- a/src/test/java/org/apache/commons/math4/fitting/leastsquares/RandomStraightLinePointGenerator.java
+++ b/src/test/java/org/apache/commons/math4/fitting/leastsquares/RandomStraightLinePointGenerator.java
@@ -66,8 +66,7 @@ public class RandomStraightLinePointGenerator {
         intercept = b;
         error = new NormalDistribution(rng, 0, sigma,
                                        NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
-        x = new UniformRealDistribution(rng, lo, hi,
-                                        UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
+        x = new UniformRealDistribution(rng, lo, hi);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-math/blob/96ba5ec2/src/test/java/org/apache/commons/math4/optim/nonlinear/vector/jacobian/RandomCirclePointGenerator.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/optim/nonlinear/vector/jacobian/RandomCirclePointGenerator.java
b/src/test/java/org/apache/commons/math4/optim/nonlinear/vector/jacobian/RandomCirclePointGenerator.java
index 3ce415d..d969b57 100644
--- a/src/test/java/org/apache/commons/math4/optim/nonlinear/vector/jacobian/RandomCirclePointGenerator.java
+++ b/src/test/java/org/apache/commons/math4/optim/nonlinear/vector/jacobian/RandomCirclePointGenerator.java
@@ -59,8 +59,7 @@ public class RandomCirclePointGenerator {
                                     NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
         cY = new NormalDistribution(rng, y, ySigma,
                                     NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
-        tP = new UniformRealDistribution(rng, 0, MathUtils.TWO_PI,
-                                         UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
+        tP = new UniformRealDistribution(rng, 0, MathUtils.TWO_PI);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-math/blob/96ba5ec2/src/test/java/org/apache/commons/math4/optim/nonlinear/vector/jacobian/RandomStraightLinePointGenerator.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/optim/nonlinear/vector/jacobian/RandomStraightLinePointGenerator.java
b/src/test/java/org/apache/commons/math4/optim/nonlinear/vector/jacobian/RandomStraightLinePointGenerator.java
index a08b959..41def57 100644
--- a/src/test/java/org/apache/commons/math4/optim/nonlinear/vector/jacobian/RandomStraightLinePointGenerator.java
+++ b/src/test/java/org/apache/commons/math4/optim/nonlinear/vector/jacobian/RandomStraightLinePointGenerator.java
@@ -67,8 +67,7 @@ public class RandomStraightLinePointGenerator {
         intercept = b;
         error = new NormalDistribution(rng, 0, sigma,
                                        NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
-        x = new UniformRealDistribution(rng, lo, hi,
-                                        UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
+        x = new UniformRealDistribution(rng, lo, hi);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-math/blob/96ba5ec2/src/test/java/org/apache/commons/math4/optimization/general/RandomCirclePointGenerator.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/optimization/general/RandomCirclePointGenerator.java
b/src/test/java/org/apache/commons/math4/optimization/general/RandomCirclePointGenerator.java
index 3e3f919..07ace1f 100644
--- a/src/test/java/org/apache/commons/math4/optimization/general/RandomCirclePointGenerator.java
+++ b/src/test/java/org/apache/commons/math4/optimization/general/RandomCirclePointGenerator.java
@@ -60,8 +60,7 @@ public class RandomCirclePointGenerator {
                                     NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
         cY = new NormalDistribution(rng, y, ySigma,
                                     NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
-        tP = new UniformRealDistribution(rng, 0, MathUtils.TWO_PI,
-                                         UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
+        tP = new UniformRealDistribution(rng, 0, MathUtils.TWO_PI);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-math/blob/96ba5ec2/src/test/java/org/apache/commons/math4/optimization/general/RandomStraightLinePointGenerator.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/optimization/general/RandomStraightLinePointGenerator.java
b/src/test/java/org/apache/commons/math4/optimization/general/RandomStraightLinePointGenerator.java
index 2a0a970..e591962 100644
--- a/src/test/java/org/apache/commons/math4/optimization/general/RandomStraightLinePointGenerator.java
+++ b/src/test/java/org/apache/commons/math4/optimization/general/RandomStraightLinePointGenerator.java
@@ -67,8 +67,7 @@ public class RandomStraightLinePointGenerator {
         intercept = b;
         error = new NormalDistribution(rng, 0, sigma,
                                        NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
-        x = new UniformRealDistribution(rng, lo, hi,
-                                        UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
+        x = new UniformRealDistribution(rng, lo, hi);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-math/blob/96ba5ec2/src/test/java/org/apache/commons/math4/random/EmpiricalDistributionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/random/EmpiricalDistributionTest.java
b/src/test/java/org/apache/commons/math4/random/EmpiricalDistributionTest.java
index b4ed00f..288264c 100644
--- a/src/test/java/org/apache/commons/math4/random/EmpiricalDistributionTest.java
+++ b/src/test/java/org/apache/commons/math4/random/EmpiricalDistributionTest.java
@@ -44,9 +44,7 @@ import org.junit.Test;
 
 /**
  * Test cases for the EmpiricalDistribution class
- *
  */
-
 public final class EmpiricalDistributionTest extends RealDistributionAbstractTest {
 
     protected EmpiricalDistribution empiricalDistribution = null;
@@ -542,8 +540,7 @@ public final class EmpiricalDistributionTest extends RealDistributionAbstractTes
         }
         @Override
         protected RealDistribution getKernel(SummaryStatistics bStats) {
-            return new UniformRealDistribution(randomData.getRandomGenerator(), bStats.getMin(),
bStats.getMax(),
-                    UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
+            return new UniformRealDistribution(randomData.getRandomGenerator(), bStats.getMin(),
bStats.getMax());
         }
     }
 }


Mime
View raw message