diff --git a/src/java/org/apache/commons/math/distribution/BetaDistribution.java b/src/java/org/apache/commons/math/distribution/BetaDistribution.java
index d511d3526..caac986df 100644
--- a/src/java/org/apache/commons/math/distribution/BetaDistribution.java
+++ b/src/java/org/apache/commons/math/distribution/BetaDistribution.java
@@ -21,7 +21,9 @@ import org.apache.commons.math.MathException;
/**
* 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
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 @@ public class BetaDistributionImpl
}
}
- /**
- * 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);
}
diff --git a/src/java/org/apache/commons/math/distribution/HasDensity.java b/src/java/org/apache/commons/math/distribution/HasDensity.java
index 9d15b65da..e414990ca 100644
--- a/src/java/org/apache/commons/math/distribution/HasDensity.java
+++ b/src/java/org/apache/commons/math/distribution/HasDensity.java
@@ -22,6 +22,8 @@ import org.apache.commons.math.MathException;
/**
* 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
{
diff --git a/src/java/org/apache/commons/math/distribution/NormalDistributionImpl.java b/src/java/org/apache/commons/math/distribution/NormalDistributionImpl.java
index 292798c91..cc3fac70a 100644
--- a/src/java/org/apache/commons/math/distribution/NormalDistributionImpl.java
+++ b/src/java/org/apache/commons/math/distribution/NormalDistributionImpl.java
@@ -35,12 +35,14 @@ public class NormalDistributionImpl extends AbstractContinuousDistribution
/** 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.
diff --git a/src/java/org/apache/commons/math/linear/DecompositionSolver.java b/src/java/org/apache/commons/math/linear/DecompositionSolver.java
index d8c249524..94765d019 100644
--- a/src/java/org/apache/commons/math/linear/DecompositionSolver.java
+++ b/src/java/org/apache/commons/math/linear/DecompositionSolver.java
@@ -40,7 +40,7 @@ public interface DecompositionSolver extends Serializable {
/**
* 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})
diff --git a/src/java/org/apache/commons/math/linear/EigenDecomposition.java b/src/java/org/apache/commons/math/linear/EigenDecomposition.java
index 19e609c58..0fd95e30c 100644
--- a/src/java/org/apache/commons/math/linear/EigenDecomposition.java
+++ b/src/java/org/apache/commons/math/linear/EigenDecomposition.java
@@ -93,6 +93,7 @@ public interface EigenDecomposition extends DecompositionSolver {
/**
* 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 @@ public interface EigenDecomposition extends DecompositionSolver {
/**
* 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
diff --git a/src/java/org/apache/commons/math/linear/GershgorinCirclesUnion.java b/src/java/org/apache/commons/math/linear/GershgorinCirclesUnion.java
index 2f88aa89e..e89e52b51 100644
--- a/src/java/org/apache/commons/math/linear/GershgorinCirclesUnion.java
+++ b/src/java/org/apache/commons/math/linear/GershgorinCirclesUnion.java
@@ -75,13 +75,18 @@ class GershgorinCirclesUnion implements Comparable
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 { diff --git a/src/java/org/apache/commons/math/linear/SingularValueDecomposition.java b/src/java/org/apache/commons/math/linear/SingularValueDecomposition.java index e7b7db7f6..cfb9e1476 100644 --- a/src/java/org/apache/commons/math/linear/SingularValueDecomposition.java +++ b/src/java/org/apache/commons/math/linear/SingularValueDecomposition.java @@ -56,7 +56,7 @@ public interface SingularValueDecomposition extends DecompositionSolver { /** * 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 diff --git a/src/java/org/apache/commons/math/stat/regression/GLSMultipleLinearRegression.java b/src/java/org/apache/commons/math/stat/regression/GLSMultipleLinearRegression.java index df3f776e7..55375c16b 100644 --- a/src/java/org/apache/commons/math/stat/regression/GLSMultipleLinearRegression.java +++ b/src/java/org/apache/commons/math/stat/regression/GLSMultipleLinearRegression.java @@ -48,6 +48,11 @@ public class GLSMultipleLinearRegression extends AbstractMultipleLinearRegressio /** 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); diff --git a/src/java/org/apache/commons/math/stat/regression/OLSMultipleLinearRegression.java b/src/java/org/apache/commons/math/stat/regression/OLSMultipleLinearRegression.java index d696dcf94..06ac1595a 100644 --- a/src/java/org/apache/commons/math/stat/regression/OLSMultipleLinearRegression.java +++ b/src/java/org/apache/commons/math/stat/regression/OLSMultipleLinearRegression.java @@ -58,7 +58,7 @@ public class OLSMultipleLinearRegression extends AbstractMultipleLinearRegressio /** Cached QR decomposition of X matrix */ private QRDecomposition qr = null; - /* + /** * {@inheritDoc} * * Computes and caches QR decomposition of the X matrix.