From df95ffdc2461464a7dabcdb5f5c494bac63f66f6 Mon Sep 17 00:00:00 2001 From: Phil Steitz Date: Sun, 27 Nov 2011 03:15:46 +0000 Subject: [PATCH] Made moment statistics package scope. JIRA: MATH-694. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1206658 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/math/stat/descriptive/moment/FirstMoment.java | 2 +- .../commons/math/stat/descriptive/moment/FourthMoment.java | 2 +- .../commons/math/stat/descriptive/moment/ThirdMoment.java | 2 +- src/site/xdoc/changes.xml | 5 +++++ .../stat/descriptive/{ => moment}/InteractionTest.java | 7 +------ 5 files changed, 9 insertions(+), 9 deletions(-) rename src/test/java/org/apache/commons/math/stat/descriptive/{ => moment}/InteractionTest.java (85%) diff --git a/src/main/java/org/apache/commons/math/stat/descriptive/moment/FirstMoment.java b/src/main/java/org/apache/commons/math/stat/descriptive/moment/FirstMoment.java index 5d5b2f4bc..b7a280314 100644 --- a/src/main/java/org/apache/commons/math/stat/descriptive/moment/FirstMoment.java +++ b/src/main/java/org/apache/commons/math/stat/descriptive/moment/FirstMoment.java @@ -47,7 +47,7 @@ import org.apache.commons.math.util.MathUtils; * * @version $Id$ */ -public class FirstMoment extends AbstractStorelessUnivariateStatistic +class FirstMoment extends AbstractStorelessUnivariateStatistic implements Serializable { /** Serializable version identifier */ diff --git a/src/main/java/org/apache/commons/math/stat/descriptive/moment/FourthMoment.java b/src/main/java/org/apache/commons/math/stat/descriptive/moment/FourthMoment.java index ed288e708..773d30fa5 100644 --- a/src/main/java/org/apache/commons/math/stat/descriptive/moment/FourthMoment.java +++ b/src/main/java/org/apache/commons/math/stat/descriptive/moment/FourthMoment.java @@ -53,7 +53,7 @@ import org.apache.commons.math.util.MathUtils; * * @version $Id$ */ -public class FourthMoment extends ThirdMoment implements Serializable{ +class FourthMoment extends ThirdMoment implements Serializable{ /** Serializable version identifier */ private static final long serialVersionUID = 4763990447117157611L; diff --git a/src/main/java/org/apache/commons/math/stat/descriptive/moment/ThirdMoment.java b/src/main/java/org/apache/commons/math/stat/descriptive/moment/ThirdMoment.java index 7e7c49c8b..cdff758e1 100644 --- a/src/main/java/org/apache/commons/math/stat/descriptive/moment/ThirdMoment.java +++ b/src/main/java/org/apache/commons/math/stat/descriptive/moment/ThirdMoment.java @@ -47,7 +47,7 @@ import org.apache.commons.math.util.MathUtils; * * @version $Id$ */ -public class ThirdMoment extends SecondMoment implements Serializable { +class ThirdMoment extends SecondMoment implements Serializable { /** Serializable version identifier */ private static final long serialVersionUID = -7818711964045118679L; diff --git a/src/site/xdoc/changes.xml b/src/site/xdoc/changes.xml index 0a7a06196..8dd81a140 100644 --- a/src/site/xdoc/changes.xml +++ b/src/site/xdoc/changes.xml @@ -52,6 +52,11 @@ The type attribute can be add,update,fix,remove. If the output is not quite correct, check for invisible trailing spaces! --> + + Removed First, Second, Third, Fourth moments from the public API. + These internally used statistics have non-standard definitions. + The classes remain, but now have package scope. + Added support for population variance in StatUtils, SummaryStatistics and DescriptiveStatistics and clarified javadoc to make it clear that diff --git a/src/test/java/org/apache/commons/math/stat/descriptive/InteractionTest.java b/src/test/java/org/apache/commons/math/stat/descriptive/moment/InteractionTest.java similarity index 85% rename from src/test/java/org/apache/commons/math/stat/descriptive/InteractionTest.java rename to src/test/java/org/apache/commons/math/stat/descriptive/moment/InteractionTest.java index 3799b9dfa..262604689 100644 --- a/src/test/java/org/apache/commons/math/stat/descriptive/InteractionTest.java +++ b/src/test/java/org/apache/commons/math/stat/descriptive/moment/InteractionTest.java @@ -14,13 +14,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.math.stat.descriptive; +package org.apache.commons.math.stat.descriptive.moment; -import org.apache.commons.math.stat.descriptive.moment.FourthMoment; -import org.apache.commons.math.stat.descriptive.moment.Kurtosis; -import org.apache.commons.math.stat.descriptive.moment.Mean; -import org.apache.commons.math.stat.descriptive.moment.Skewness; -import org.apache.commons.math.stat.descriptive.moment.Variance; import org.junit.Assert; import org.junit.Test;