diff --git a/src/main/java/org/apache/commons/math3/stat/Frequency.java b/src/main/java/org/apache/commons/math3/stat/Frequency.java index 19423051e..d9d7506c5 100644 --- a/src/main/java/org/apache/commons/math3/stat/Frequency.java +++ b/src/main/java/org/apache/commons/math3/stat/Frequency.java @@ -48,6 +48,12 @@ import org.apache.commons.math3.util.MathUtils; * to combine integral types with chars in a frequency distribution will fail. *
*+ * 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. + * + *
* The values are ordered using the default (natural order), unless a
* Comparator
is supplied in the constructor.
- * Returns Double.NaN
if no values have been added.
Double.NaN
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.
*
* @param v the value to lookup
* @return the proportion of values equal to v