commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1503631 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/Frequency.java
Date Tue, 16 Jul 2013 09:35:54 GMT
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



Mime
View raw message