You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2013/07/16 11:35:54 UTC

svn commit: r1503631 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/Frequency.java

Author: sebb
Date: Tue Jul 16 09:35:54 2013
New Revision: 1503631

URL: http://svn.apache.org/r1503631
Log:
Javadoc clarifications

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/Frequency.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/Frequency.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/Frequency.java?rev=1503631&r1=1503630&r2=1503631&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/Frequency.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/Frequency.java Tue Jul 16 09:35:54 2013
@@ -48,6 +48,12 @@ import org.apache.commons.math3.util.Mat
  * to combine integral types with chars in a frequency distribution will fail.
  * </p>
  * <p>
+ * Float is not coerced to Double.
+ * Since they are not Comparable with each other the user must do any necessary coercion.
+ * Float.NaN and Double.NaN are not treated specially; they may occur in input and will
+ * occur in output if appropriate.
+ * </b>
+ * <p>
  * The values are ordered using the default (natural order), unless a
  * <code>Comparator</code> is supplied in the constructor.</p>
  *
@@ -301,7 +307,9 @@ public class Frequency implements Serial
      * Returns the percentage of values that are equal to v
      * (as a proportion between 0 and 1).
      * <p>
-     * Returns <code>Double.NaN</code> if no values have been added.</p>
+     * Returns <code>Double.NaN</code> if no values have been added.
+     * Returns 0 if at least one value has been added, but v is not comparable
+     * to the values set.</p>
      *
      * @param v the value to lookup
      * @return the proportion of values equal to v