Return-Path: Delivered-To: apmail-commons-commits-archive@locus.apache.org Received: (qmail 89756 invoked from network); 16 Oct 2008 13:33:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Oct 2008 13:33:07 -0000 Received: (qmail 31251 invoked by uid 500); 16 Oct 2008 13:33:07 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 31183 invoked by uid 500); 16 Oct 2008 13:33:07 -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 31174 invoked by uid 99); 16 Oct 2008 13:33:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Oct 2008 06:33:07 -0700 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; Thu, 16 Oct 2008 13:31:57 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CB49623888A0; Thu, 16 Oct 2008 06:32:34 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r705239 - in /commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math: distribution/ linear/ stat/regression/ Date: Thu, 16 Oct 2008 13:32:33 -0000 To: commits@commons.apache.org From: luc@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081016133234.CB49623888A0@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: luc Date: Thu Oct 16 06:32:32 2008 New Revision: 705239 URL: http://svn.apache.org/viewvc?rev=705239&view=rev Log: fixed checkstyle warnings Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/BetaDistribution.java commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/BetaDistributionImpl.java commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/HasDensity.java commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/NormalDistributionImpl.java commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/DecompositionSolver.java commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/EigenDecomposition.java commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/GershgorinCirclesUnion.java commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/LUDecompositionImpl.java commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/SingularValueDecomposition.java commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/stat/regression/GLSMultipleLinearRegression.java commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/stat/regression/OLSMultipleLinearRegression.java Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/BetaDistribution.java URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/BetaDistribution.java?rev=705239&r1=705238&r2=705239&view=diff ============================================================================== --- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/BetaDistribution.java (original) +++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/BetaDistribution.java Thu Oct 16 06:32:32 2008 @@ -21,7 +21,9 @@ /** * Computes the cumulative, inverse cumulative and density functions for the beta distribuiton. * - * See http://en.wikipedia.org/wiki/Beta_distribution + * @see Beta_distribution + * @version $Revision$ $Date$ + * @since 2.0 */ public interface BetaDistribution extends ContinuousDistribution, HasDensity { /** @@ -52,6 +54,7 @@ * Return the probability density for a particular point. * @param x The point at which the density should be computed. * @return The pdf at point x. + * @exception MathException if probability density cannot be computed */ double density(Double x) throws MathException; Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/BetaDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/BetaDistributionImpl.java?rev=705239&r1=705238&r2=705239&view=diff ============================================================================== --- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/BetaDistributionImpl.java (original) +++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/BetaDistributionImpl.java Thu Oct 16 06:32:32 2008 @@ -29,6 +29,8 @@ * Beta distribution * *

+ * @version $Revision$ $Date$ + * @since 2.0 */ public class BetaDistributionImpl extends AbstractContinuousDistribution implements BetaDistribution { @@ -58,40 +60,24 @@ z = Double.NaN; } - /** - * Modify the shape parameter, alpha. - * - * @param alpha the new shape parameter. - */ + /** {@inheritDoc} */ public void setAlpha(double alpha) { this.alpha = alpha; z = Double.NaN; } - /** - * Access the shape parameter, alpha - * - * @return alpha. - */ + /** {@inheritDoc} */ public double getAlpha() { return alpha; } - /** - * Modify the shape parameter, beta. - * - * @param beta the new scale parameter. - */ + /** {@inheritDoc} */ public void setBeta(double beta) { this.beta = beta; z = Double.NaN; } - /** - * Access the shape parameter, beta - * - * @return beta. - */ + /** {@inheritDoc} */ public double getBeta() { return beta; } @@ -105,12 +91,7 @@ } } - /** - * Return the probability density for a particular point. - * - * @param x The point at which the density should be computed. - * @return The pdf at point x. - */ + /** {@inheritDoc} */ public double density(Double x) throws MathException { recomputeZ(); if (x < 0 || x > 1) { @@ -132,15 +113,7 @@ } } - /** - * For this distribution, X, this method returns x such that P(X < x) = p. - * - * @param p the cumulative probability. - * @return x. - * @throws org.apache.commons.math.MathException - * if the inverse cumulative probability can not be - * computed due to convergence or other numerical errors. - */ + /** {@inheritDoc} */ public double inverseCumulativeProbability(double p) throws MathException { if (p == 0) { return 0; @@ -151,57 +124,22 @@ } } - /** - * Access the initial domain value, based on p, used to - * bracket a CDF root. This method is used by - * {@link #inverseCumulativeProbability(double)} to find critical values. - * - * @param p the desired probability for the critical value - * @return initial domain value - */ + /** {@inheritDoc} */ protected double getInitialDomain(double p) { return p; } - /** - * Access the domain value lower bound, based on p, used to - * bracket a CDF root. This method is used by - * {@link #inverseCumulativeProbability(double)} to find critical values. - * - * @param p the desired probability for the critical value - * @return domain value lower bound, i.e. - * P(X < lower bound) < p - */ + /** {@inheritDoc} */ protected double getDomainLowerBound(double p) { return 0; } - /** - * Access the domain value upper bound, based on p, used to - * bracket a CDF root. This method is used by - * {@link #inverseCumulativeProbability(double)} to find critical values. - * - * @param p the desired probability for the critical value - * @return domain value upper bound, i.e. - * P(X < upper bound) > p - */ + /** {@inheritDoc} */ protected double getDomainUpperBound(double p) { return 1; } - /** - * For a random variable X whose values are distributed according - * to this distribution, this method returns P(X ≤ x). In other words, - * this method represents the (cumulative) distribution function, or - * CDF, for this distribution. - * - * @param x the value at which the distribution function is evaluated. - * @return the probability that a random variable with this - * distribution takes a value less than or equal to x - * @throws org.apache.commons.math.MathException - * if the cumulative probability can not be - * computed due to convergence or other numerical errors. - */ + /** {@inheritDoc} */ public double cumulativeProbability(double x) throws MathException { if (x <= 0) { return 0; @@ -212,20 +150,7 @@ } } - /** - * For a random variable X whose values are distributed according - * to this distribution, this method returns P(x0 ≤ X ≤ x1). - * - * @param x0 the (inclusive) lower bound - * @param x1 the (inclusive) upper bound - * @return the probability that a random variable with this distribution - * will take a value between x0 and x1, - * including the endpoints - * @throws org.apache.commons.math.MathException - * if the cumulative probability can not be - * computed due to convergence or other numerical errors. - * @throws IllegalArgumentException if x0 > x1 - */ + /** {@inheritDoc} */ public double cumulativeProbability(double x0, double x1) throws MathException { return cumulativeProbability(x1) - cumulativeProbability(x0); } Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/HasDensity.java URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/HasDensity.java?rev=705239&r1=705238&r2=705239&view=diff ============================================================================== --- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/HasDensity.java (original) +++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/HasDensity.java Thu Oct 16 06:32:32 2008 @@ -22,6 +22,8 @@ /** * Interface that signals that a distribution can compute the probability density function * for a particular point. + * @param

the type of the point at which density is to be computed, this + * may be for example Double * @version $Revision$ $Date$ */ public interface HasDensity

{ Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/NormalDistributionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/NormalDistributionImpl.java?rev=705239&r1=705238&r2=705239&view=diff ============================================================================== --- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/NormalDistributionImpl.java (original) +++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/distribution/NormalDistributionImpl.java Thu Oct 16 06:32:32 2008 @@ -35,12 +35,14 @@ /** Serializable version identifier */ private static final long serialVersionUID = 8589540077390120676L; + /** &sqrt;(2 π) */ + private static final double SQRT2PI = Math.sqrt(2 * Math.PI); + /** The mean of this distribution. */ private double mean = 0; /** The standard deviation of this distribution. */ private double standardDeviation = 1; - private static final double SQRT2PI = Math.sqrt(2 * Math.PI); /** * Create a normal distribution using the given mean and standard deviation. Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/DecompositionSolver.java URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/DecompositionSolver.java?rev=705239&r1=705238&r2=705239&view=diff ============================================================================== --- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/DecompositionSolver.java (original) +++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/DecompositionSolver.java Thu Oct 16 06:32:32 2008 @@ -40,7 +40,7 @@ /** * Decompose a matrix. - * @param matrix + * @param matrix matrix to decompose * @exception InvalidMatrixException if matrix does not fulfill * the decomposition requirements (for example non-square matrix * for {@link LUDecomposition}) Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/EigenDecomposition.java URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/EigenDecomposition.java?rev=705239&r1=705238&r2=705239&view=diff ============================================================================== --- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/EigenDecomposition.java (original) +++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/EigenDecomposition.java Thu Oct 16 06:32:32 2008 @@ -93,6 +93,7 @@ /** * Returns the ith eigenvalue of the original matrix. + * @param i index of the eigenvalue (counting from 0) * @return ith eigenvalue of the original matrix * @exception IllegalStateException if {@link * DecompositionSolver#decompose(RealMatrix) decompose} has not been called @@ -103,6 +104,7 @@ /** * Returns a copy of the ith eigenvector of the original matrix. + * @param i index of the eigenvector (counting from 0) * @return copy of the ith eigenvector of the original matrix * @exception IllegalStateException if {@link * DecompositionSolver#decompose(RealMatrix) decompose} has not been called Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/GershgorinCirclesUnion.java URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/GershgorinCirclesUnion.java?rev=705239&r1=705238&r2=705239&view=diff ============================================================================== --- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/GershgorinCirclesUnion.java (original) +++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/GershgorinCirclesUnion.java Thu Oct 16 06:32:32 2008 @@ -75,13 +75,18 @@ * either circles union. It is mainly intended for circles unions * that {@link #intersects(GershgorinCirclesUnion) intersect} * each other beforehand.

+ * @param other Gershgorin circles union to swallow */ public void swallow(final GershgorinCirclesUnion other) { low = Math.min(low, other.low); high = Math.max(high, other.high); } - /** Comparator class for sorting intervals. */ + /** Compare another Gershgorin circles union in interval start order. + * @param other Gershgorin circles union to compare to instance + * @return a negative, zero or positive value depending on the other + * union starting before, at same location or after instance + */ public int compareTo(GershgorinCirclesUnion other) { return Double.compare(low, other.low); } Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/LUDecompositionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/LUDecompositionImpl.java?rev=705239&r1=705238&r2=705239&view=diff ============================================================================== --- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/LUDecompositionImpl.java (original) +++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/LUDecompositionImpl.java Thu Oct 16 06:32:32 2008 @@ -348,8 +348,10 @@ *

The A matrix is implicit here. It is

* @param b right-hand side of the equation A × X = B * @return a vector X such that A × X = B - * @throws IllegalArgumentException if matrices dimensions don't match - * @throws InvalidMatrixException if decomposed matrix is singular + * @exception IllegalStateException if {@link #decompose(RealMatrix) decompose} + * has not been called + * @exception IllegalArgumentException if matrices dimensions don't match + * @exception InvalidMatrixException if decomposed matrix is singular */ public RealVectorImpl solve(RealVectorImpl b) throws IllegalStateException, IllegalArgumentException, InvalidMatrixException { Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/SingularValueDecomposition.java URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/SingularValueDecomposition.java?rev=705239&r1=705238&r2=705239&view=diff ============================================================================== --- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/SingularValueDecomposition.java (original) +++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/SingularValueDecomposition.java Thu Oct 16 06:32:32 2008 @@ -56,7 +56,7 @@ /** * Decompose a matrix to find its largest singular values. - * @param matrix + * @param matrix matrix to decompose * @param maxSingularValues maximal number of singular values to compute * @exception InvalidMatrixException (wrapping a {@link ConvergenceException} * if algorithm fails to converge Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/stat/regression/GLSMultipleLinearRegression.java URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/stat/regression/GLSMultipleLinearRegression.java?rev=705239&r1=705238&r2=705239&view=diff ============================================================================== --- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/stat/regression/GLSMultipleLinearRegression.java (original) +++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/stat/regression/GLSMultipleLinearRegression.java Thu Oct 16 06:32:32 2008 @@ -48,6 +48,11 @@ /** Inverse of covariance matrix. */ private RealMatrix OmegaInverse; + /** Replace sample data, overriding any previous sample. + * @param y y values of the sample + * @param x x values of the sample + * @param covariance array representing the covariance matrix + */ public void newSampleData(double[] y, double[][] x, double[][] covariance) { validateSampleData(x, y); newYSampleData(y); Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/stat/regression/OLSMultipleLinearRegression.java URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/stat/regression/OLSMultipleLinearRegression.java?rev=705239&r1=705238&r2=705239&view=diff ============================================================================== --- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/stat/regression/OLSMultipleLinearRegression.java (original) +++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/stat/regression/OLSMultipleLinearRegression.java Thu Oct 16 06:32:32 2008 @@ -58,7 +58,7 @@ /** Cached QR decomposition of X matrix */ private QRDecomposition qr = null; - /* + /** * {@inheritDoc} * * Computes and caches QR decomposition of the X matrix.