From e42ab0ec6c4a1b7838ec9f14143126d4b6cad548 Mon Sep 17 00:00:00 2001 From: Phil Steitz Date: Sat, 10 Jan 2015 15:41:51 -0700 Subject: [PATCH] Javadoc (a few missed updates re: MATH-1146) --- .../commons/math3/stat/descriptive/moment/FirstMoment.java | 4 +++- .../commons/math3/stat/descriptive/moment/SecondMoment.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/math3/stat/descriptive/moment/FirstMoment.java b/src/main/java/org/apache/commons/math3/stat/descriptive/moment/FirstMoment.java index eaf9788ee..5f2b95af3 100644 --- a/src/main/java/org/apache/commons/math3/stat/descriptive/moment/FirstMoment.java +++ b/src/main/java/org/apache/commons/math3/stat/descriptive/moment/FirstMoment.java @@ -38,7 +38,9 @@ import org.apache.commons.math3.util.MathUtils; * m = m + (new value - m) / (number of observations) *

*

- * Returns Double.NaN if the dataset is empty.

+ * Returns Double.NaN if the dataset is empty. Note that + * Double.NaN may also be returned if the input includes NaN and / or infinite + * values.

*

* Note that this implementation is not synchronized. If * multiple threads access an instance of this class concurrently, and at least diff --git a/src/main/java/org/apache/commons/math3/stat/descriptive/moment/SecondMoment.java b/src/main/java/org/apache/commons/math3/stat/descriptive/moment/SecondMoment.java index 5caeca385..12715c09c 100644 --- a/src/main/java/org/apache/commons/math3/stat/descriptive/moment/SecondMoment.java +++ b/src/main/java/org/apache/commons/math3/stat/descriptive/moment/SecondMoment.java @@ -36,7 +36,9 @@ import org.apache.commons.math3.util.MathUtils; * new value = old value + dev^2 * (n -1) / n.

*

* Returns Double.NaN if no data values have been added and - * returns 0 if there is just one value in the data set.

+ * returns 0 if there is just one value in the data set. + * Note that Double.NaN may also be returned if the input includes NaN + * and / or infinite values.

*

* Note that this implementation is not synchronized. If * multiple threads access an instance of this class concurrently, and at least