You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2018/01/23 23:49:30 UTC

[2/3] commons-rng git commit: Unused "import".

Unused "import".


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

Branch: refs/heads/master
Commit: 8714ca78974bed5d629dfc5868a3a66d23b6b794
Parents: 6ee82f1
Author: Gilles <er...@apache.org>
Authored: Wed Jan 24 00:42:55 2018 +0100
Committer: Gilles <er...@apache.org>
Committed: Wed Jan 24 00:42:55 2018 +0100

----------------------------------------------------------------------
 .../rng/sampling/DiscreteProbabilityCollectionSampler.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/8714ca78/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSampler.java
----------------------------------------------------------------------
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSampler.java b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSampler.java
index 8f87c15..8c77da0 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSampler.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSampler.java
@@ -17,7 +17,6 @@
 
 package org.apache.commons.rng.sampling;
 
-import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.HashMap;
@@ -27,7 +26,7 @@ import java.util.Arrays;
 import org.apache.commons.rng.UniformRandomProvider;
 
 /**
- * Sampling from a {@link Collection} of items with user-defined
+ * Sampling from a collection of items with user-defined
  * <a href="http://en.wikipedia.org/wiki/Probability_distribution#Discrete_probability_distribution">
  * probabilities</a>.
  * Note that if all unique items are assigned the same probability,
@@ -157,6 +156,7 @@ public class DiscreteProbabilityCollectionSampler<T> {
      * @throws IllegalArgumentException if the number of items in the
      * {@code collection} is not equal to the number of provided
      * {@code probabilities}.
+     * @param <T> Type of items in the collection.
      */
     private static <T> Map<T, Double> consolidate(List<T> collection,
                                                   double[] probabilities) {