Return-Path:
X-Original-To: apmail-commons-commits-archive@minotaur.apache.org
Delivered-To: apmail-commons-commits-archive@minotaur.apache.org
Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
by minotaur.apache.org (Postfix) with SMTP id 1F30118171
for ;
Thu, 3 Dec 2015 03:35:02 +0000 (UTC)
Received: (qmail 15881 invoked by uid 500); 3 Dec 2015 03:34:57 -0000
Delivered-To: apmail-commons-commits-archive@commons.apache.org
Received: (qmail 15807 invoked by uid 500); 3 Dec 2015 03:34:56 -0000
Mailing-List: contact commits-help@commons.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: dev@commons.apache.org
Delivered-To: mailing list commits@commons.apache.org
Received: (qmail 15798 invoked by uid 99); 3 Dec 2015 03:34:56 -0000
Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org)
(140.211.11.23)
by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2015 03:34:56 +0000
Received: by git1-us-west.apache.org (ASF Mail Server at
git1-us-west.apache.org, from userid 33)
id 80DC4E60D4; Thu, 3 Dec 2015 03:34:56 +0000 (UTC)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: psteitz@apache.org
To: commits@commons.apache.org
Message-Id:
X-Mailer: ASF-Git Admin Mailer
Subject: [math] Fixed errors / omissions in javadoc regarding NaN return
values. JIRA: MATH-1296.
Date: Thu, 3 Dec 2015 03:34:56 +0000 (UTC)
Repository: commons-math
Updated Branches:
refs/heads/master 9085dfacc -> b2627dacc
Fixed errors / omissions in javadoc regarding NaN return values. JIRA: MATH-1296.
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/b2627dac
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/b2627dac
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/b2627dac
Branch: refs/heads/master
Commit: b2627daccef8f41e83649d085268dc247b3fbb3f
Parents: 9085dfa
Author: Phil Steitz
Authored: Wed Dec 2 20:34:49 2015 -0700
Committer: Phil Steitz
Committed: Wed Dec 2 20:34:49 2015 -0700
----------------------------------------------------------------------
.../stat/descriptive/DescriptiveStatistics.java | 17 ++++++++++-------
.../math4/stat/descriptive/moment/Skewness.java | 5 +++++
2 files changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/b2627dac/src/main/java/org/apache/commons/math4/stat/descriptive/DescriptiveStatistics.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/stat/descriptive/DescriptiveStatistics.java b/src/main/java/org/apache/commons/math4/stat/descriptive/DescriptiveStatistics.java
index d6dfca1..99e02cc 100644
--- a/src/main/java/org/apache/commons/math4/stat/descriptive/DescriptiveStatistics.java
+++ b/src/main/java/org/apache/commons/math4/stat/descriptive/DescriptiveStatistics.java
@@ -208,9 +208,12 @@ public class DescriptiveStatistics implements StatisticalSummary, Serializable {
/**
* Returns the
- * geometric mean of the available values
+ * geometric mean of the available values.
+ *
+ * See {@link GeometricMean} for details on the computing algorithm.
+ *
* @return The geometricMean, Double.NaN if no values have been added,
- * or if the product of the available values is less than or equal to 0.
+ * or if any negative values have been added.
*/
public double getGeometricMean() {
return apply(geometricMeanImpl);
@@ -275,8 +278,8 @@ public class DescriptiveStatistics implements StatisticalSummary, Serializable {
/**
* Returns the skewness of the available values. Skewness is a
* measure of the asymmetry of a given distribution.
- * @return The skewness, Double.NaN if no values have been added
- * or 0.0 for a value set <=2.
+ *
+ * @return The skewness, Double.NaN if less than 3 values have been added.
*/
public double getSkewness() {
return apply(skewnessImpl);
@@ -284,9 +287,9 @@ public class DescriptiveStatistics implements StatisticalSummary, Serializable {
/**
* Returns the Kurtosis of the available values. Kurtosis is a
- * measure of the "peakedness" of a distribution
- * @return The kurtosis, Double.NaN if no values have been added, or 0.0
- * for a value set <=3.
+ * measure of the "peakedness" of a distribution.
+ *
+ * @return The kurtosis, Double.NaN if less than 4 values have been added.
*/
public double getKurtosis() {
return apply(kurtosisImpl);
http://git-wip-us.apache.org/repos/asf/commons-math/blob/b2627dac/src/main/java/org/apache/commons/math4/stat/descriptive/moment/Skewness.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/stat/descriptive/moment/Skewness.java b/src/main/java/org/apache/commons/math4/stat/descriptive/moment/Skewness.java
index 8dca668..93a7f7f 100644
--- a/src/main/java/org/apache/commons/math4/stat/descriptive/moment/Skewness.java
+++ b/src/main/java/org/apache/commons/math4/stat/descriptive/moment/Skewness.java
@@ -35,6 +35,11 @@ import org.apache.commons.math4.util.MathUtils;
* where n is the number of values, mean is the {@link Mean} and std is the
* {@link StandardDeviation}
*
+ * Note that this statistic is undefined for n < 3. Double.Nan
+ * is returned when there is not sufficient data to compute the statistic.
+ * 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
* one of the threads invokes the increment()
or