From b84e9460b523946b4579966421b25fc2febc4880 Mon Sep 17 00:00:00 2001 From: "Mark R. Diggory" Date: Sat, 21 Jun 2003 02:21:49 +0000 Subject: [PATCH] This is a multifile commit, it covers checkstyle errors in javadoc etc. PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20936 Submitted by: brent@worden.org git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@140936 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/math/ContinuedFraction.java | 22 ++--- .../AbstractContinuousDistribution.java | 2 +- .../distribution/ChiSquaredDistribution.java | 11 +-- .../distribution/DistributionFactory.java | 4 - .../distribution/ExponentialDistribution.java | 10 +- .../ExponentialDistributionImpl.java | 95 ++++++++++++++----- .../math/distribution/FDistribution.java | 16 ++-- .../math/distribution/FDistributionImpl.java | 36 ++++--- .../math/distribution/GammaDistribution.java | 11 +-- .../distribution/GammaDistributionImpl.java | 8 +- .../math/distribution/TDistribution.java | 14 +-- .../math/distribution/TDistributionImpl.java | 14 +-- .../org/apache/commons/math/special/Beta.java | 55 ++++++----- .../apache/commons/math/special/Gamma.java | 10 -- 14 files changed, 157 insertions(+), 151 deletions(-) diff --git a/src/java/org/apache/commons/math/ContinuedFraction.java b/src/java/org/apache/commons/math/ContinuedFraction.java index 332b93104..93c076775 100644 --- a/src/java/org/apache/commons/math/ContinuedFraction.java +++ b/src/java/org/apache/commons/math/ContinuedFraction.java @@ -54,16 +54,14 @@ package org.apache.commons.math; /** - *

* Provides a generic means to evaluate continued fractions. Subclasses simply * provided the a and b coefficients to evaluate the continued fraction. - *

* - *

- * Reference:
- * - * Continued Fraction - *

+ * References: + * * * @author Brent Worden */ @@ -126,11 +124,8 @@ public abstract class ContinuedFraction { } /** - *

* Evaluates the continued fraction at the value x. - *

* - *

* The implementation of this method is based on: *

- *

* * @param x the evaluation point. * @param epsilon maximum error allowed. @@ -188,11 +182,11 @@ public abstract class ContinuedFraction { f[1][1] = (a[1][0] * an[0][1]) + (a[1][1] * an[1][1]); // determine if we're close enough - if(Math.abs((f[0][0] * f[1][1]) - (f[1][0] * f[0][1])) < - Math.abs(epsilon * f[1][0] * f[1][1])){ + if (Math.abs((f[0][0] * f[1][1]) - (f[1][0] * f[0][1])) < + Math.abs(epsilon * f[1][0] * f[1][1])) { ret = f[0][0] / f[1][0]; } else { - if(n >= maxIterations){ + if (n >= maxIterations) { throw new ConvergenceException( "Continued fraction convergents failed to converge."); } diff --git a/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java b/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java index 6ace83fc2..ce3276614 100644 --- a/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java +++ b/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java @@ -94,7 +94,7 @@ public abstract class AbstractContinuousDistribution * @return x, such that P(X < x) = p */ public double inverseCummulativeProbability(final double p) { - if (p < 0.0 || p > 1.0){ + if (p < 0.0 || p > 1.0) { throw new IllegalArgumentException( "p must be between 0.0 and 1.0, inclusive."); } diff --git a/src/java/org/apache/commons/math/distribution/ChiSquaredDistribution.java b/src/java/org/apache/commons/math/distribution/ChiSquaredDistribution.java index 0ca8ec4dc..e6bcd9581 100644 --- a/src/java/org/apache/commons/math/distribution/ChiSquaredDistribution.java +++ b/src/java/org/apache/commons/math/distribution/ChiSquaredDistribution.java @@ -54,21 +54,16 @@ package org.apache.commons.math.stat.distribution; /** - *

- * The Chi-Squared Distribution - *

+ * The Chi-Squared Distribution. * - *

* Instances of ChiSquaredDistribution objects should be created using - * {@link DistributionFactory#createChiSquareDistribution(double)} - *

+ * {@link DistributionFactory#createChiSquareDistribution(double)}. * - *

* References: *

* * @author Brent Worden */ diff --git a/src/java/org/apache/commons/math/distribution/DistributionFactory.java b/src/java/org/apache/commons/math/distribution/DistributionFactory.java index 96f3f49f8..95ab012d1 100644 --- a/src/java/org/apache/commons/math/distribution/DistributionFactory.java +++ b/src/java/org/apache/commons/math/distribution/DistributionFactory.java @@ -54,7 +54,6 @@ package org.apache.commons.math.stat.distribution; /** - *

* This factory provids the means to create common statistical distributions. * The following distributions are supported: *

- *

* - *

* Common usage:

  * DistributionFactory factory = DistributionFactory.newInstance();
  * 
  * // create a Chi-Square distribution with 5 degrees of freedom.
  * ChiSquaredDistribution chi = factory.createChiSquareDistribution(5.0);
  * 
- *

* * @author Brent Worden */ diff --git a/src/java/org/apache/commons/math/distribution/ExponentialDistribution.java b/src/java/org/apache/commons/math/distribution/ExponentialDistribution.java index 6b0f60277..8a1e8d56b 100644 --- a/src/java/org/apache/commons/math/distribution/ExponentialDistribution.java +++ b/src/java/org/apache/commons/math/distribution/ExponentialDistribution.java @@ -54,21 +54,15 @@ package org.apache.commons.math.stat.distribution; /** - *

- * The Exponential Distribution - *

+ * The Exponential Distribution. * - *

* Instances of ExponentialDistribution objects should be created using - * {@link DistributionFactory#createExponentialDistribution(double)} - *

+ * {@link DistributionFactory#createExponentialDistribution(double)}. * - *

* References: *