Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 93394 invoked from network); 18 Jan 2011 16:25:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Jan 2011 16:25:02 -0000 Received: (qmail 70659 invoked by uid 500); 18 Jan 2011 16:25:01 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 69932 invoked by uid 500); 18 Jan 2011 16:24:58 -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 69356 invoked by uid 99); 18 Jan 2011 16:24:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jan 2011 16:24:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jan 2011 16:24:54 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9C6D723889DD; Tue, 18 Jan 2011 16:24:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1060449 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math: distribution/ special/ stat/ stat/descriptive/ stat/inference/ util/ Date: Tue, 18 Jan 2011 16:24:28 -0000 To: commits@commons.apache.org From: erans@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110118162428.9C6D723889DD@eris.apache.org> Author: erans Date: Tue Jan 18 16:24:27 2011 New Revision: 1060449 URL: http://svn.apache.org/viewvc?rev=1060449&view=rev Log: Removed trailing spaces. Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractDistribution.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/CauchyDistributionImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ChiSquaredDistributionImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/Distribution.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/FDistributionImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/GammaDistributionImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/NormalDistributionImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PascalDistributionImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/TDistributionImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistributionImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/special/Erf.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/Frequency.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalSummaryValues.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/MannWhitneyUTest.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/MannWhitneyUTestImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/WilcoxonSignedRankTest.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/WilcoxonSignedRankTestImpl.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ResizableDoubleArray.java Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java Tue Jan 18 16:24:27 2011 @@ -226,7 +226,7 @@ public abstract class AbstractContinuous * @return lower bound of the support (might be Double.NEGATIVE_INFINITY) */ public abstract double getSupportLowerBound(); - + /** * Access the upper bound of the support. * Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractDistribution.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractDistribution.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractDistribution.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractDistribution.java Tue Jan 18 16:24:27 2011 @@ -35,16 +35,16 @@ public abstract class AbstractDistributi /** Cached numerical mean */ private double numericalMean = Double.NaN; - + /** Whether or not the numerical mean has been calculated */ private boolean numericalMeanIsCalculated = false; /** Cached numerical variance */ private double numericalVariance = Double.NaN; - + /** Whether or not the numerical variance has been calculated */ private boolean numericalVarianceIsCalculated = false; - + /** * Default constructor. */ @@ -77,18 +77,18 @@ public abstract class AbstractDistributi } return cumulativeProbability(x1) - cumulativeProbability(x0); } - + /** - * Use this method to actually calculate the mean for the - * specific distribution. Use {@link #getNumericalMean()} + * Use this method to actually calculate the mean for the + * specific distribution. Use {@link #getNumericalMean()} * (which implements caching) to actually get the mean. - * + * * @return the mean or Double.NaN if it's not defined */ protected abstract double calculateNumericalMean(); - + /** - * Use this method to get the numerical value of the mean of this + * Use this method to get the numerical value of the mean of this * distribution. * * @return the mean or Double.NaN if it's not defined @@ -101,22 +101,22 @@ public abstract class AbstractDistributi return numericalMean; } - + /** - * Use this method to actually calculate the variance for the - * specific distribution. Use {@link #getNumericalVariance()} - * (which implements caching) to actually get the variance. + * Use this method to actually calculate the variance for the + * specific distribution. Use {@link #getNumericalVariance()} + * (which implements caching) to actually get the variance. * * @return the variance or Double.NaN if it's not defined */ protected abstract double calculateNumericalVariance(); - + /** - * Use this method to get the numerical value of the variance of this + * Use this method to get the numerical value of the variance of this * distribution. * - * @return the variance (possibly Double.POSITIVE_INFINITY as - * for certain cases in {@link TDistributionImpl}) or + * @return the variance (possibly Double.POSITIVE_INFINITY as + * for certain cases in {@link TDistributionImpl}) or * Double.NaN if it's not defined */ public double getNumericalVariance() { @@ -124,40 +124,40 @@ public abstract class AbstractDistributi numericalVariance = calculateNumericalVariance(); numericalVarianceIsCalculated = true; } - + return numericalVariance; - } - + } + /** - * Use this method to get information about whether the lower bound + * Use this method to get information about whether the lower bound * of the support is inclusive or not. * * @return whether the lower bound of the support is inclusive or not */ public abstract boolean isSupportLowerBoundInclusive(); - + /** - * Use this method to get information about whether the upper bound + * Use this method to get information about whether the upper bound * of the support is inclusive or not. * * @return whether the upper bound of the support is inclusive or not */ - public abstract boolean isSupportUpperBoundInclusive(); - + public abstract boolean isSupportUpperBoundInclusive(); + /** - * Use this method to get information about whether the support is connected, + * Use this method to get information about whether the support is connected, * i.e. whether all values between the lower and upper bound of the support * is included in the support. - * + * * For {@link AbstractIntegerDistribution} the support is discrete, so - * if this is true, then the support is + * if this is true, then the support is * {lower bound, lower bound + 1, ..., upper bound}. - * + * * For {@link AbstractContinuousDistribution} the support is continuous, so * if this is true, then the support is the interval * [lower bound, upper bound] - * where the limits are inclusive or not according to - * {@link #isSupportLowerBoundInclusive()} and {@link #isSupportUpperBoundInclusive()} + * where the limits are inclusive or not according to + * {@link #isSupportLowerBoundInclusive()} and {@link #isSupportUpperBoundInclusive()} * (in the example both are true). If both are false, then the support is the interval * (lower bound, upper bound) * Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java Tue Jan 18 16:24:27 2011 @@ -290,42 +290,42 @@ public abstract class AbstractIntegerDis * @return the domain value upper bound, i.e. {@code P(X < 'upper bound') > p}. */ protected abstract int getDomainUpperBound(double p); - + /** * Access the lower bound of the support. * * @return lower bound of the support (Integer.MIN_VALUE for negative infinity) */ public abstract int getSupportLowerBound(); - + /** * Access the upper bound of the support. * * @return upper bound of the support (Integer.MAX_VALUE for positive infinity) */ public abstract int getSupportUpperBound(); - + /** - * Use this method to get information about whether the lower bound + * Use this method to get information about whether the lower bound * of the support is inclusive or not. For discrete support, * only true here is meaningful. * - * @return true (always but at Integer.MIN_VALUE because of the nature of discrete support) + * @return true (always but at Integer.MIN_VALUE because of the nature of discrete support) */ @Override public boolean isSupportLowerBoundInclusive() { return true; } - + /** - * Use this method to get information about whether the upper bound + * Use this method to get information about whether the upper bound * of the support is inclusive or not. For discrete support, * only true here is meaningful. * - * @return true (always but at Integer.MAX_VALUE because of the nature of discrete support) + * @return true (always but at Integer.MAX_VALUE because of the nature of discrete support) */ @Override public boolean isSupportUpperBoundInclusive() { return true; - } + } } Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/BetaDistributionImpl.java Tue Jan 18 16:24:27 2011 @@ -187,7 +187,7 @@ public class BetaDistributionImpl /** * {@inheritDoc} - * + * * The lower bound of the support is always 0 no matter the parameters. * * @return lower bound of the support (always 0) @@ -199,7 +199,7 @@ public class BetaDistributionImpl /** * {@inheritDoc} - * + * * The upper bound of the support is always 1 no matter the parameters. * * @return upper bound of the support (always 1) @@ -211,8 +211,8 @@ public class BetaDistributionImpl /** * {@inheritDoc} - * - * For first shape parameter s1 and + * + * For first shape parameter s1 and * second shape parameter s2, the mean is * s1 / (s1 + s2) * @@ -226,9 +226,9 @@ public class BetaDistributionImpl /** * {@inheritDoc} - * - * For first shape parameter s1 and - * second shape parameter s2, + * + * For first shape parameter s1 and + * second shape parameter s2, * the variance is * [ s1 * s2 ] / [ (s1 + s2)^2 * (s1 + s2 + 1) ] * @@ -237,7 +237,7 @@ public class BetaDistributionImpl @Override protected double calculateNumericalVariance() { final double a = getAlpha(); - final double b = getBeta(); + final double b = getBeta(); final double alphabetasum = a + b; return (a * b) / ((alphabetasum * alphabetasum) * (alphabetasum + 1)); } Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/BinomialDistributionImpl.java Tue Jan 18 16:24:27 2011 @@ -167,8 +167,8 @@ public class BinomialDistributionImpl ex /** * {@inheritDoc} - * - * The lower bound of the support is always 0 no matter the number of trials + * + * The lower bound of the support is always 0 no matter the number of trials * and probability parameter. * * @return lower bound of the support (always 0) @@ -177,10 +177,10 @@ public class BinomialDistributionImpl ex public int getSupportLowerBound() { return 0; } - + /** * {@inheritDoc} - * + * * The upper bound of the support is the number of trials. * * @return upper bound of the support (equal to number of trials) @@ -192,8 +192,8 @@ public class BinomialDistributionImpl ex /** * {@inheritDoc} - * - * For n number of trials and + * + * For n number of trials and * probability parameter p, the mean is * n * p * @@ -206,8 +206,8 @@ public class BinomialDistributionImpl ex /** * {@inheritDoc} - * - * For n number of trials and + * + * For n number of trials and * probability parameter p, the variance is * n * p * (1 - p) * Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/CauchyDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/CauchyDistributionImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/CauchyDistributionImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/CauchyDistributionImpl.java Tue Jan 18 16:24:27 2011 @@ -163,7 +163,7 @@ public class CauchyDistributionImpl exte } return ret; - } + } /** * Access the domain value upper bound, based on p, used to @@ -223,8 +223,8 @@ public class CauchyDistributionImpl exte /** * {@inheritDoc} - * - * The lower bound of the support is always negative infinity no matter + * + * The lower bound of the support is always negative infinity no matter * the parameters. * * @return lower bound of the support (always Double.NEGATIVE_INFINITY) @@ -236,8 +236,8 @@ public class CauchyDistributionImpl exte /** * {@inheritDoc} - * - * The upper bound of the support is always positive infinity no matter + * + * The upper bound of the support is always positive infinity no matter * the parameters. * * @return upper bound of the support (always Double.POSITIVE_INFINITY) @@ -249,7 +249,7 @@ public class CauchyDistributionImpl exte /** * {@inheritDoc} - * + * * The mean is always undefined no matter the parameters. * * @return mean (always Double.NaN) @@ -261,7 +261,7 @@ public class CauchyDistributionImpl exte /** * {@inheritDoc} - * + * * The variance is always undefined no matter the parameters. * * @return variance (always Double.NaN) Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ChiSquaredDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ChiSquaredDistributionImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ChiSquaredDistributionImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ChiSquaredDistributionImpl.java Tue Jan 18 16:24:27 2011 @@ -196,8 +196,8 @@ public class ChiSquaredDistributionImpl /** * {@inheritDoc} - * - * The lower bound of the support is always 0 no matter the + * + * The lower bound of the support is always 0 no matter the * degrees of freedom. * * @return lower bound of the support (always 0) @@ -209,8 +209,8 @@ public class ChiSquaredDistributionImpl /** * {@inheritDoc} - * - * The upper bound of the support is always positive infinity no matter the + * + * The upper bound of the support is always positive infinity no matter the * degrees of freedom. * * @return upper bound of the support (always Double.POSITIVE_INFINITY) @@ -222,7 +222,7 @@ public class ChiSquaredDistributionImpl /** * {@inheritDoc} - * + * * For k degrees of freedom, the mean is * k * @@ -235,7 +235,7 @@ public class ChiSquaredDistributionImpl /** * {@inheritDoc} - * + * * For k degrees of freedom, the variance is * 2 * k * Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/Distribution.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/Distribution.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/Distribution.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/Distribution.java Tue Jan 18 16:24:27 2011 @@ -52,55 +52,55 @@ public interface Distribution { * @throws IllegalArgumentException if x0 > x1 */ double cumulativeProbability(double x0, double x1) throws MathException; - + /** - * Use this method to get the numerical value of the mean of this + * Use this method to get the numerical value of the mean of this * distribution. * * @return the mean or Double.NaN if it's not defined */ double getNumericalMean(); - + /** - * Use this method to get the numerical value of the variance of this + * Use this method to get the numerical value of the variance of this * distribution. * - * @return the variance (possibly Double.POSITIVE_INFINITY as - * for certain cases in {@link TDistributionImpl}) or + * @return the variance (possibly Double.POSITIVE_INFINITY as + * for certain cases in {@link TDistributionImpl}) or * Double.NaN if it's not defined */ - double getNumericalVariance(); - + double getNumericalVariance(); + /** - * Use this method to get information about whether the lower bound + * Use this method to get information about whether the lower bound * of the support is inclusive or not. * * @return whether the lower bound of the support is inclusive or not */ boolean isSupportLowerBoundInclusive(); - + /** - * Use this method to get information about whether the upper bound + * Use this method to get information about whether the upper bound * of the support is inclusive or not. * * @return whether the upper bound of the support is inclusive or not */ - boolean isSupportUpperBoundInclusive(); - + boolean isSupportUpperBoundInclusive(); + /** - * Use this method to get information about whether the support is connected, + * Use this method to get information about whether the support is connected, * i.e. whether all values between the lower and upper bound of the support * is included in the support. - * + * * For {@link AbstractIntegerDistribution} the support is discrete, so - * if this is true, then the support is + * if this is true, then the support is * {lower bound, lower bound + 1, ..., upper bound}. - * + * * For {@link AbstractContinuousDistribution} the support is continuous, so * if this is true, then the support is the interval * [lower bound, upper bound] - * where the limits are inclusive or not according to - * {@link #isSupportLowerBoundInclusive()} and {@link #isSupportUpperBoundInclusive()} + * where the limits are inclusive or not according to + * {@link #isSupportLowerBoundInclusive()} and {@link #isSupportUpperBoundInclusive()} * (in the example both are true). If both are false, then the support is the interval * (lower bound, upper bound) * Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ExponentialDistributionImpl.java Tue Jan 18 16:24:27 2011 @@ -225,7 +225,7 @@ public class ExponentialDistributionImpl /** * {@inheritDoc} - * + * * The lower bound of the support is always 0 no matter the mean parameter. * * @return lower bound of the support (always 0) @@ -237,8 +237,8 @@ public class ExponentialDistributionImpl /** * {@inheritDoc} - * - * The upper bound of the support is always positive infinity + * + * The upper bound of the support is always positive infinity * no matter the mean parameter. * * @return upper bound of the support (always Double.POSITIVE_INFINITY) @@ -250,7 +250,7 @@ public class ExponentialDistributionImpl /** * {@inheritDoc} - * + * * For mean parameter k, the mean is * k * @@ -263,7 +263,7 @@ public class ExponentialDistributionImpl /** * {@inheritDoc} - * + * * For mean parameter k, the variance is * k^2 * Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/FDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/FDistributionImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/FDistributionImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/FDistributionImpl.java Tue Jan 18 16:24:27 2011 @@ -235,10 +235,10 @@ public class FDistributionImpl protected double getSolverAbsoluteAccuracy() { return solverAbsoluteAccuracy; } - + /** * {@inheritDoc} - * + * * The lower bound of the support is always 0 no matter the parameters. * * @return lower bound of the support (always 0) @@ -250,8 +250,8 @@ public class FDistributionImpl /** * {@inheritDoc} - * - * The upper bound of the support is always positive infinity + * + * The upper bound of the support is always positive infinity * no matter the parameters. * * @return upper bound of the support (always Double.POSITIVE_INFINITY) @@ -263,8 +263,8 @@ public class FDistributionImpl /** * {@inheritDoc} - * - * For denominator degrees of freedom parameter b, + * + * For denominator degrees of freedom parameter b, * the mean is *
    *
  • if b > 2 then b / (b - 2)
  • @@ -272,27 +272,27 @@ public class FDistributionImpl *
* * @return {@inheritDoc} - */ + */ @Override - protected double calculateNumericalMean() { + protected double calculateNumericalMean() { final double denominatorDF = getDenominatorDegreesOfFreedom(); if (denominatorDF > 2) { - return denominatorDF / (denominatorDF - 2); + return denominatorDF / (denominatorDF - 2); } - + return Double.NaN; } /** * {@inheritDoc} - * - * For numerator degrees of freedom parameter a - * and denominator degrees of freedom parameter b, + * + * For numerator degrees of freedom parameter a + * and denominator degrees of freedom parameter b, * the variance is *
    *
  • - * if b > 4 then + * if b > 4 then * [ 2 * b^2 * (a + b - 2) ] / [ a * (b - 2)^2 * (b - 4) ] *
  • *
  • else undefined @@ -307,12 +307,12 @@ public class FDistributionImpl if (denominatorDF > 4) { final double numeratorDF = getNumeratorDegreesOfFreedom(); final double denomDFMinusTwo = denominatorDF - 2; - + return ( 2 * (denominatorDF * denominatorDF) * (numeratorDF + denominatorDF - 2) ) / ( (numeratorDF * (denomDFMinusTwo * denomDFMinusTwo) * (denominatorDF - 4)) ); } - - return Double.NaN; + + return Double.NaN; } /** Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/GammaDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/GammaDistributionImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/GammaDistributionImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/GammaDistributionImpl.java Tue Jan 18 16:24:27 2011 @@ -240,7 +240,7 @@ public class GammaDistributionImpl exten /** * {@inheritDoc} - * + * * The lower bound of the support is always 0 no matter the parameters. * * @return lower bound of the support (always 0) @@ -252,8 +252,8 @@ public class GammaDistributionImpl exten /** * {@inheritDoc} - * - * The upper bound of the support is always positive infinity + * + * The upper bound of the support is always positive infinity * no matter the parameters. * * @return upper bound of the support (always Double.POSITIVE_INFINITY) @@ -265,8 +265,8 @@ public class GammaDistributionImpl exten /** * {@inheritDoc} - * - * For shape parameter alpha and scale + * + * For shape parameter alpha and scale * parameter beta, the mean is * alpha * beta * @@ -279,8 +279,8 @@ public class GammaDistributionImpl exten /** * {@inheritDoc} - * - * For shape parameter alpha and scale + * + * For shape parameter alpha and scale * parameter beta, the variance is * alpha * beta^2 * @@ -288,7 +288,7 @@ public class GammaDistributionImpl exten */ @Override protected double calculateNumericalVariance() { - final double b = getBeta(); + final double b = getBeta(); return getAlpha() * b * b; } Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/HypergeometricDistributionImpl.java Tue Jan 18 16:24:27 2011 @@ -287,10 +287,10 @@ public class HypergeometricDistributionI /** * {@inheritDoc} - * - * For population size N, - * number of successes m, and - * sample size n, + * + * For population size N, + * number of successes m, and + * sample size n, * the lower bound of the support is * max(0, n + m - N) * @@ -298,15 +298,15 @@ public class HypergeometricDistributionI */ @Override public int getSupportLowerBound() { - return FastMath.max(0, + return FastMath.max(0, getSampleSize() + getNumberOfSuccesses() - getPopulationSize()); } /** * {@inheritDoc} - * - * For number of successes m and - * sample size n, + * + * For number of successes m and + * sample size n, * the upper bound of the support is * min(m, n) * @@ -319,9 +319,9 @@ public class HypergeometricDistributionI /** * {@inheritDoc} - * - * For population size N, - * number of successes m, and + * + * For population size N, + * number of successes m, and * sample size n, the mean is * n * m / N * @@ -334,9 +334,9 @@ public class HypergeometricDistributionI /** * {@inheritDoc} - * - * For population size N, - * number of successes m, and + * + * For population size N, + * number of successes m, and * sample size n, the variance is * [ n * m * (N - n) * (N - m) ] / [ N^2 * (N - 1) ] * Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/NormalDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/NormalDistributionImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/NormalDistributionImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/NormalDistributionImpl.java Tue Jan 18 16:24:27 2011 @@ -244,8 +244,8 @@ public class NormalDistributionImpl exte /** * {@inheritDoc} - * - * The lower bound of the support is always negative infinity + * + * The lower bound of the support is always negative infinity * no matter the parameters. * * @return lower bound of the support (always Double.NEGATIVE_INFINITY) @@ -257,8 +257,8 @@ public class NormalDistributionImpl exte /** * {@inheritDoc} - * - * The upper bound of the support is always positive infinity + * + * The upper bound of the support is always positive infinity * no matter the parameters. * * @return upper bound of the support (always Double.POSITIVE_INFINITY) @@ -270,7 +270,7 @@ public class NormalDistributionImpl exte /** * {@inheritDoc} - * + * * For mean parameter mu, the mean is mu * * @return {@inheritDoc} @@ -282,8 +282,8 @@ public class NormalDistributionImpl exte /** * {@inheritDoc} - * - * For standard deviation parameter s, + * + * For standard deviation parameter s, * the variance is s^2 * * @return {@inheritDoc} Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PascalDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PascalDistributionImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PascalDistributionImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PascalDistributionImpl.java Tue Jan 18 16:24:27 2011 @@ -168,7 +168,7 @@ public class PascalDistributionImpl exte /** * {@inheritDoc} - * + * * The lower bound of the support is always 0 no matter the parameters. * * @return lower bound of the support (always 0) @@ -180,10 +180,10 @@ public class PascalDistributionImpl exte /** * {@inheritDoc} - * - * The upper bound of the support is always positive infinity - * no matter the parameters. Positive infinity is symbolised - * by Integer.MAX_VALUE together with + * + * The upper bound of the support is always positive infinity + * no matter the parameters. Positive infinity is symbolised + * by Integer.MAX_VALUE together with * {@link #isSupportUpperBoundInclusive()} being false * * @return upper bound of the support (always Integer.MAX_VALUE for positive infinity) @@ -195,8 +195,8 @@ public class PascalDistributionImpl exte /** * {@inheritDoc} - * - * For number of successes r and + * + * For number of successes r and * probability of success p, the mean is * ( r * p ) / ( 1 - p ) * @@ -211,8 +211,8 @@ public class PascalDistributionImpl exte /** * {@inheritDoc} - * - * For number of successes r and + * + * For number of successes r and * probability of success p, the mean is * ( r * p ) / ( 1 - p )^2 * @@ -225,7 +225,7 @@ public class PascalDistributionImpl exte final double pInv = 1 - p; return ( r * p ) / (pInv * pInv); } - + /** * {@inheritDoc} */ Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java Tue Jan 18 16:24:27 2011 @@ -233,7 +233,7 @@ public class PoissonDistributionImpl ext /** * {@inheritDoc} - * + * * The lower bound of the support is always 0 no matter the mean parameter. * * @return lower bound of the support (always 0) @@ -245,9 +245,9 @@ public class PoissonDistributionImpl ext /** * {@inheritDoc} - * - * The upper bound of the support is positive infinity, - * regardless of the parameter values. There is no integer infinity, + * + * The upper bound of the support is positive infinity, + * regardless of the parameter values. There is no integer infinity, * so this method returns Integer.MAX_VALUE and * {@link #isSupportUpperBoundInclusive()} returns true. * @@ -260,7 +260,7 @@ public class PoissonDistributionImpl ext /** * {@inheritDoc} - * + * * For mean parameter p, the mean is p * * @return {@inheritDoc} @@ -272,7 +272,7 @@ public class PoissonDistributionImpl ext /** * {@inheritDoc} - * + * * For mean parameter p, the variance is p * * @return {@inheritDoc} @@ -281,7 +281,7 @@ public class PoissonDistributionImpl ext protected double calculateNumericalVariance() { return getMean(); } - + /** * {@inheritDoc} */ Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/TDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/TDistributionImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/TDistributionImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/TDistributionImpl.java Tue Jan 18 16:24:27 2011 @@ -202,8 +202,8 @@ public class TDistributionImpl /** * {@inheritDoc} - * - * The lower bound of the support is always negative infinity + * + * The lower bound of the support is always negative infinity * no matter the parameters. * * @return lower bound of the support (always Double.NEGATIVE_INFINITY) @@ -215,8 +215,8 @@ public class TDistributionImpl /** * {@inheritDoc} - * - * The upper bound of the support is always positive infinity + * + * The upper bound of the support is always positive infinity * no matter the parameters. * * @return upper bound of the support (always Double.POSITIVE_INFINITY) @@ -228,7 +228,7 @@ public class TDistributionImpl /** * {@inheritDoc} - * + * * For degrees of freedom parameter df, the mean is *
      *
    • if df > 1 then 0
    • @@ -240,17 +240,17 @@ public class TDistributionImpl @Override protected double calculateNumericalMean() { final double df = getDegreesOfFreedom(); - + if (df > 1) { return 0; } - - return Double.NaN; + + return Double.NaN; } /** * {@inheritDoc} - * + * * For degrees of freedom parameter df, the variance is *
        *
      • if df > 2 then df / (df - 2)
      • @@ -262,7 +262,7 @@ public class TDistributionImpl */ @Override protected double calculateNumericalVariance() { - final double df = getDegreesOfFreedom(); + final double df = getDegreesOfFreedom(); if (df > 2) { return df / (df - 2); @@ -271,7 +271,7 @@ public class TDistributionImpl if (df > 1 && df <= 2) { return Double.POSITIVE_INFINITY; } - + return Double.NaN; } Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/WeibullDistributionImpl.java Tue Jan 18 16:24:27 2011 @@ -219,7 +219,7 @@ public class WeibullDistributionImpl ext /** * {@inheritDoc} - * + * * The lower bound of the support is always 0 no matter the parameters. * * @return lower bound of the support (always 0) @@ -231,8 +231,8 @@ public class WeibullDistributionImpl ext /** * {@inheritDoc} - * - * The upper bound of the support is always positive infinity + * + * The upper bound of the support is always positive infinity * no matter the parameters. * * @return upper bound of the support (always Double.POSITIVE_INFINITY) @@ -244,7 +244,7 @@ public class WeibullDistributionImpl ext /** * {@inheritDoc} - * + * * The mean is scale * Gamma(1 + (1 / shape)) * where Gamma(...) is the Gamma-function * @@ -260,9 +260,9 @@ public class WeibullDistributionImpl ext /** * {@inheritDoc} - * - * The variance is - * scale^2 * Gamma(1 + (2 / shape)) - mean^2 + * + * The variance is + * scale^2 * Gamma(1 + (2 / shape)) - mean^2 * where Gamma(...) is the Gamma-function * * @return {@inheritDoc} @@ -273,7 +273,7 @@ public class WeibullDistributionImpl ext final double sc = getScale(); final double mn = getNumericalMean(); - return (sc * sc) * + return (sc * sc) * FastMath.exp(Gamma.logGamma(1 + (2 / sh))) - (mn * mn); } Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistributionImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistributionImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/ZipfDistributionImpl.java Tue Jan 18 16:24:27 2011 @@ -150,19 +150,19 @@ public class ZipfDistributionImpl extend /** * {@inheritDoc} - * + * * The lower bound of the support is always 1 no matter the parameters. * * @return lower bound of the support (always 1) */ @Override - public int getSupportLowerBound() { + public int getSupportLowerBound() { return 1; } /** * {@inheritDoc} - * + * * The upper bound of the support is the number of elements * * @return upper bound of the support @@ -174,11 +174,11 @@ public class ZipfDistributionImpl extend /** * {@inheritDoc} - * + * * For number of elements N and exponent s, the mean is - * Hs1 / Hs where + * Hs1 / Hs where *
          - *
        • Hs1 = generalizedHarmonic(N, s - 1)
        • + *
        • Hs1 = generalizedHarmonic(N, s - 1)
        • *
        • Hs = generalizedHarmonic(N, s)
        • *
        * @@ -188,7 +188,7 @@ public class ZipfDistributionImpl extend protected double calculateNumericalMean() { final int N = getNumberOfElements(); final double s = getExponent(); - + final double Hs1 = generalizedHarmonic(N, s - 1); final double Hs = generalizedHarmonic(N, s); @@ -197,22 +197,22 @@ public class ZipfDistributionImpl extend /** * {@inheritDoc} - * + * * For number of elements N and exponent s, the mean is - * (Hs2 / Hs) - (Hs1^2 / Hs^2) where + * (Hs2 / Hs) - (Hs1^2 / Hs^2) where *
          *
        • Hs2 = generalizedHarmonic(N, s - 2)
        • - *
        • Hs1 = generalizedHarmonic(N, s - 1)
        • + *
        • Hs1 = generalizedHarmonic(N, s - 1)
        • *
        • Hs = generalizedHarmonic(N, s)
        • *
        - * + * * @return {@inheritDoc} */ @Override protected double calculateNumericalVariance() { final int N = getNumberOfElements(); final double s = getExponent(); - + final double Hs2 = generalizedHarmonic(N, s - 2); final double Hs1 = generalizedHarmonic(N, s - 1); final double Hs = generalizedHarmonic(N, s); Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/special/Erf.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/special/Erf.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/special/Erf.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/special/Erf.java Tue Jan 18 16:24:27 2011 @@ -41,7 +41,7 @@ public class Erf { *

        This implementation computes erf(x) using the * {@link Gamma#regularizedGammaP(double, double, double, int) regularized gamma function}, * following Erf, equation (3)

        - * + * *

        The value returned is always between -1 and 1 (inclusive). If {@code abs(x) > 40}, then * {@code erf(x)} is indistinguishable from either 1 or -1 as a double, so the appropriate extreme * value is returned.

        @@ -61,7 +61,7 @@ public class Erf { } return ret; } - + /** *

        Returns the complementary error function

        *

        erfc(x) = 2/√π x e-t2dt
        @@ -70,11 +70,11 @@ public class Erf { *

        This implementation computes erfc(x) using the * {@link Gamma#regularizedGammaQ(double, double, double, int) regularized gamma function}, * following Erf, equation (3).

        - * + * *

        The value returned is always between 0 and 2 (inclusive). If {@code abs(x) > 40}, then * {@code erf(x)} is indistinguishable from either 0 or 2 as a double, so the appropriate extreme * value is returned.

        - * + * * @param x the value * @return the complementary error function erfc(x) * @throws MathException if the algorithm fails to converge Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/Frequency.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/Frequency.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/Frequency.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/Frequency.java Tue Jan 18 16:24:27 2011 @@ -243,9 +243,9 @@ public class Frequency implements Serial /** * Returns the number of values in the frequency table. - * + * * @return the number of unique values that have been added to the frequency table. - * @see #valuesIterator() + * @see #valuesIterator() */ public int getUniqueCount(){ return freqTable.keySet().size(); Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java Tue Jan 18 16:24:27 2011 @@ -126,7 +126,7 @@ public class DescriptiveStatistics imple /** * Construct a DescriptiveStatistics instance with an infinite window * and the initial data values in double[] initialDoubleArray. - * If initialDoubleArray is null, then this constructor corresponds to + * If initialDoubleArray is null, then this constructor corresponds to * DescriptiveStatistics() * * @param initialDoubleArray the initial double[]. @@ -136,7 +136,7 @@ public class DescriptiveStatistics imple eDA = new ResizableDoubleArray(initialDoubleArray); } } - + /** * Copy constructor. Construct a new DescriptiveStatistics instance that * is a copy of original. Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalSummaryValues.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalSummaryValues.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalSummaryValues.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalSummaryValues.java Tue Jan 18 16:24:27 2011 @@ -160,7 +160,7 @@ public class StatisticalSummaryValues im result = result * 31 + MathUtils.hash(getVariance()); return result; } - + /** * Generates a text report displaying values of statistics. * Each statistic is displayed on a separate line. Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/MannWhitneyUTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/MannWhitneyUTest.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/MannWhitneyUTest.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/MannWhitneyUTest.java Tue Jan 18 16:24:27 2011 @@ -20,7 +20,7 @@ import org.apache.commons.math.MathExcep /** * An interface for Mann-Whitney U test (also called Wilcoxon rank-sum test). - * + * * @version $Revision$ $Date$ */ public interface MannWhitneyUTest { @@ -46,7 +46,7 @@ public interface MannWhitneyUTest { *
      • The observations are at least ordinal (continuous are also ordinal).
      • *
      *

      - * + * * @param x * the first sample * @param y @@ -76,7 +76,7 @@ public interface MannWhitneyUTest { *
    • The observations are at least ordinal (continuous are also ordinal).
    • *
    *

    - * + * * @param x * the first sample * @param y Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/MannWhitneyUTestImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/MannWhitneyUTestImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/MannWhitneyUTestImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/MannWhitneyUTestImpl.java Tue Jan 18 16:24:27 2011 @@ -26,7 +26,7 @@ import org.apache.commons.math.util.Fast /** * An implementation of the Mann-Whitney U test (also called Wilcoxon rank-sum * test). - * + * * @version $Revision$ $Date$ */ public class MannWhitneyUTestImpl implements MannWhitneyUTest { @@ -45,7 +45,7 @@ public class MannWhitneyUTestImpl implem /** * Create a test instance using the given strategies for NaN's and ties. * Only use this if you are sure of what you are doing. - * + * * @param nanStrategy * specifies the strategy that should be used for Double.NaN's * @param tiesStrategy @@ -58,7 +58,7 @@ public class MannWhitneyUTestImpl implem /** * Ensures that the provided arrays fulfills the assumptions. - * + * * @param x * @param y * @throws IllegalArgumentException @@ -96,7 +96,7 @@ public class MannWhitneyUTestImpl implem /** * {@inheritDoc} - * + * * @param x * the first sample * @param y @@ -148,7 +148,7 @@ public class MannWhitneyUTestImpl implem */ private double calculateAsymptoticPValue(final double Umin, final int n1, final int n2) throws MathException { - + final int n1n2prod = n1 * n2; // http://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U#Normal_approximation @@ -167,9 +167,9 @@ public class MannWhitneyUTestImpl implem * Ties give rise to biased variance at the moment. See e.g. http://mlsc.lboro.ac.uk/resources/statistics/Mannwhitney.pdf. - * + * * {@inheritDoc} - * + * * @param x * the first sample * @param y @@ -184,13 +184,13 @@ public class MannWhitneyUTestImpl implem throws IllegalArgumentException, MathException { ensureDataConformance(x, y); - + final double Umax = mannWhitneyU(x, y); - + /* * It can be shown that U1 + U2 = n1 * n2 */ - final double Umin = x.length * y.length - Umax; + final double Umin = x.length * y.length - Umax; return calculateAsymptoticPValue(Umin, x.length, y.length); } Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/WilcoxonSignedRankTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/WilcoxonSignedRankTest.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/WilcoxonSignedRankTest.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/WilcoxonSignedRankTest.java Tue Jan 18 16:24:27 2011 @@ -20,7 +20,7 @@ import org.apache.commons.math.MathExcep /** * An interface for Wilcoxon signed-rank test. - * + * * @version $Revision$ $Date$ */ public interface WilcoxonSignedRankTest { @@ -51,7 +51,7 @@ public interface WilcoxonSignedRankTest * meaningful.
  • *
*

- * + * * @param x * the first sample * @param y @@ -86,7 +86,7 @@ public interface WilcoxonSignedRankTest * meaningful. * *

- * + * * @param x * the first sample * @param y Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/WilcoxonSignedRankTestImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/WilcoxonSignedRankTestImpl.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/WilcoxonSignedRankTestImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/WilcoxonSignedRankTestImpl.java Tue Jan 18 16:24:27 2011 @@ -25,7 +25,7 @@ import org.apache.commons.math.util.Fast /** * An implementation of the Wilcoxon signed-rank test. - * + * * @version $Revision$ $Date$ */ public class WilcoxonSignedRankTestImpl implements WilcoxonSignedRankTest { @@ -44,7 +44,7 @@ public class WilcoxonSignedRankTestImpl /** * Create a test instance using the given strategies for NaN's and ties. * Only use this if you are sure of what you are doing. - * + * * @param nanStrategy * specifies the strategy that should be used for Double.NaN's * @param tiesStrategy @@ -57,7 +57,7 @@ public class WilcoxonSignedRankTestImpl /** * Ensures that the provided arrays fulfills the assumptions. - * + * * @param x * @param y * @throws IllegalArgumentException @@ -86,7 +86,7 @@ public class WilcoxonSignedRankTestImpl /** * Calculates y[i] - x[i] for all i - * + * * @param x * @param y * @throws IllegalArgumentException @@ -106,7 +106,7 @@ public class WilcoxonSignedRankTestImpl /** * Calculates |z[i]| for all i - * + * * @param z * @throws IllegalArgumentException * if assumptions are not met @@ -133,7 +133,7 @@ public class WilcoxonSignedRankTestImpl /** * {@inheritDoc} - * + * * @param x * the first sample * @param y @@ -144,7 +144,7 @@ public class WilcoxonSignedRankTestImpl */ public double wilcoxonSignedRank(final double[] x, final double[] y) throws IllegalArgumentException { - + ensureDataConformance(x, y); // throws IllegalArgumentException if x and y are not correctly @@ -171,12 +171,12 @@ public class WilcoxonSignedRankTestImpl /** * Algorithm inspired by * http://www.fon.hum.uva.nl/Service/Statistics/Signed_Rank_Algorihms.html#C - * by Rob van Son, Institute of Phonetic Sciences & IFOTT, + * by Rob van Son, Institute of Phonetic Sciences & IFOTT, * University of Amsterdam - * + * * @param Wmax largest Wilcoxon signed rank value * @param N number of subjects (corresponding to x.length) - * @return two-sided exact p-value + * @return two-sided exact p-value */ private double calculateExactPValue(final double Wmax, final int N) { @@ -208,22 +208,22 @@ public class WilcoxonSignedRankTestImpl */ return 2 * ((double) largerRankSums) / ((double) m); } - + /** * @param Wmin smallest Wilcoxon signed rank value * @param N number of subjects (corresponding to x.length) - * @return two-sided asymptotic p-value + * @return two-sided asymptotic p-value * @throws MathException if an error occurs computing the p-value */ private double calculateAsymptoticPValue(final double Wmin, final int N) throws MathException { - + final double ES = (double) (N * (N + 1)) / 4.0; - - /* Same as (but saves computations): + + /* Same as (but saves computations): * final double VarW = ((double) (N * (N + 1) * (2*N + 1))) / 24; */ final double VarS = ES * ((double) (2 * N + 1) / 6.0); - + // - 0.5 is a continuity correction final double z = (Wmin - ES - 0.5) / FastMath.sqrt(VarS); @@ -234,7 +234,7 @@ public class WilcoxonSignedRankTestImpl /** * {@inheritDoc} - * + * * @param x * the first sample * @param y @@ -251,16 +251,16 @@ public class WilcoxonSignedRankTestImpl public double wilcoxonSignedRankTest(final double[] x, final double[] y, boolean exactPValue) throws IllegalArgumentException, MathException { - + ensureDataConformance(x, y); final int N = x.length; final double Wmax = wilcoxonSignedRank(x, y); - + if (exactPValue && N > 30) { throw new IllegalArgumentException("Exact test can only be made for N <= 30."); } - + if (exactPValue) { return calculateExactPValue(Wmax, N); } else { Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ResizableDoubleArray.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ResizableDoubleArray.java?rev=1060449&r1=1060448&r2=1060449&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ResizableDoubleArray.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ResizableDoubleArray.java Tue Jan 18 16:24:27 2011 @@ -187,7 +187,7 @@ public class ResizableDoubleArray implem numElements = initialArray.length; } } - + /** *

* Create a ResizableArray with the specified initial capacity @@ -302,7 +302,7 @@ public class ResizableDoubleArray implem contract(); } } - + /** * Adds several element to the end of this expandable array. *