diff --git a/src/java/org/apache/commons/math/analysis/PolynomialSplineFunction.java b/src/java/org/apache/commons/math/analysis/PolynomialSplineFunction.java index 412cf4d2f..70a437248 100644 --- a/src/java/org/apache/commons/math/analysis/PolynomialSplineFunction.java +++ b/src/java/org/apache/commons/math/analysis/PolynomialSplineFunction.java @@ -24,7 +24,7 @@ import org.apache.commons.math.FunctionEvaluationException; * Represents a polynomial spline function. *

* A polynomial spline function consists of a set of - * interpolating polynomials and an ascending array of domain + * interpolating polynomials and an ascending array of domain * knot points, determining the intervals over which the spline function * is defined by the constituent polynomials. The polynomials are assumed to * have been computed to match the values of another function at the knot @@ -50,7 +50,7 @@ import org.apache.commons.math.FunctionEvaluationException; * than or equal to x. The value returned is
* polynomials[j](x - knot[j]) * - * @version $Revision: 1.8 $ $Date: 2004/07/20 12:55:01 $ + * @version $Revision: 1.9 $ $Date: 2004/07/22 02:34:25 $ */ public class PolynomialSplineFunction implements UnivariateRealFunction, Serializable { diff --git a/src/java/org/apache/commons/math/random/EmpiricalDistribution.java b/src/java/org/apache/commons/math/random/EmpiricalDistribution.java index 70b53ae78..8509ff83c 100644 --- a/src/java/org/apache/commons/math/random/EmpiricalDistribution.java +++ b/src/java/org/apache/commons/math/random/EmpiricalDistribution.java @@ -43,7 +43,7 @@ import org.apache.commons.math.stat.univariate.StatisticalSummary; * generate random values "like" those in the input file -- i.e., the values * generated will follow the distribution of the values in the file. * - * @version $Revision: 1.21 $ $Date: 2004/07/18 23:57:11 $ + * @version $Revision: 1.22 $ $Date: 2004/07/22 02:34:25 $ */ public interface EmpiricalDistribution { @@ -83,7 +83,9 @@ public interface EmpiricalDistribution { /** - * Returns a {@link StatisticalSummary} describing this distribution. + * Returns a + * {@link org.apache.commons.math.stat.univariate.StatisticalSummary} + * describing this distribution. * Preconditions:

@@ -108,9 +110,10 @@ public interface EmpiricalDistribution { int getBinCount(); /** - * Returns a list of {@link SummaryStatistics} containing statistics - * describing the values in each of the bins. The List is indexed on - * the bin number. + * Returns a list of + * {@link org.apache.commons.math.stat.univariate.SummaryStatistics} + * containing statistics describing the values in each of the bins. The + * List is indexed on the bin number. * * @return List of bin statistics */ diff --git a/src/java/org/apache/commons/math/random/RandomDataImpl.java b/src/java/org/apache/commons/math/random/RandomDataImpl.java index 9cc44a2d1..e25491e94 100644 --- a/src/java/org/apache/commons/math/random/RandomDataImpl.java +++ b/src/java/org/apache/commons/math/random/RandomDataImpl.java @@ -25,18 +25,16 @@ import java.util.Random; import java.util.Collection; /** - * Implements the RandomData interface using - * java.util.Random and - * java.util.Random.SecureRandom instances to generate data. + * Implements the {@link RandomData} interface using + * {@link java.util.Random} and {@link java.util.Random.SecureRandom} instances + * to generate data. *

- * Supports reseeding the underlying - * - * PRNG. The SecurityProvider and Algorithm + * Supports reseeding the underlying pseudo-random number generator (PRNG). + * The SecurityProvider and Algorithm * used by the SecureRandom instance can also be reset. *

- * For details on the PRNGs, see the JDK documentation for - * java.util.Random and - * java.util.Random.SecureRandom + * For details on the PRNGs, see {@link java.util.Random} and + * {@link java.util.Random.SecureRandom}. *

* Usage Notes:

+ * identical). + *
  • + * This implementation is not synchronized. + * * - * @version $Revision: 1.15 $ $Date: 2004/06/14 23:15:15 $ + * @version $Revision: 1.16 $ $Date: 2004/07/22 02:34:25 $ */ public class RandomDataImpl implements RandomData, Serializable { @@ -133,6 +138,7 @@ public class RandomDataImpl implements RandomData, Serializable { /** * Generate a random int value uniformly distributed between * lower and upper, inclusive. + * * @param lower the lower bound. * @param upper the upper bound. * @return the random integer. @@ -149,6 +155,7 @@ public class RandomDataImpl implements RandomData, Serializable { /** * Generate a random long value uniformly distributed between * lower and upper, inclusive. + * * @param lower the lower bound. * @param upper the upper bound. * @return the random integer. @@ -171,12 +178,10 @@ public class RandomDataImpl implements RandomData, Serializable { *
  • * SHA-1 hash is applied to yield a 20-byte binary digest.
  • *
  • - * Each byte of the binary digest is converted to 2 hex digits
  • - *

    - * TODO: find external reference or provide justification for the claim - * that this yields a cryptographically secure sequence of hex strings. - * @param len the desired string length. - * @return the random string. + * Each byte of the binary digest is converted to 2 hex digits. + * + * @param len the length of the generated string + * @return the random string */ public String nextSecureHexString(int len) { if (len <= 0) { @@ -229,7 +234,8 @@ public class RandomDataImpl implements RandomData, Serializable { /** * Generate a random int value uniformly distributed between * lower and upper, inclusive. This algorithm - * using a secure random number generator for its engine. + * uses a secure random number generator. + * * @param lower the lower bound. * @param upper the upper bound. * @return the random integer. @@ -246,7 +252,8 @@ public class RandomDataImpl implements RandomData, Serializable { /** * Generate a random long value uniformly distributed between * lower and upper, inclusive. This algorithm - * using a secure random number generator for its engine. + * uses a secure random number generator. + * * @param lower the lower bound. * @param upper the upper bound. * @return the random integer. @@ -261,7 +268,8 @@ public class RandomDataImpl implements RandomData, Serializable { } /** - * Generates a random long value from the Poisson distribution with the given mean. + * Generates a random long value from the Poisson distribution with the + * given mean. *

    * Algorithm Description: * Uses simulation of a Poisson process using Uniform deviates, as @@ -269,7 +277,9 @@ public class RandomDataImpl implements RandomData, Serializable { * * here. *

    - * The Poisson process (and hence value returned) is bounded by 1000 * mean. + * The Poisson process (and hence value returned) is bounded by + * 1000 * mean. + * * @param mean mean of the Poisson distribution. * @return the random Poisson value. */ @@ -295,13 +305,13 @@ public class RandomDataImpl implements RandomData, Serializable { } /** - * Generate a random value from a Normal distribution. This algorithm - * generates random values for the general Normal distribution with the - * given mean, mu and the given standard deviation, + * Generate a random value from a Normal (a.k.a. Gaussian) distribution + * with the given mean, mu and the given standard deviation, * sigma. - * @param mu the mean of the distribution. - * @param sigma the standard deviation of the distribution. - * @return the random Normal value. + * + * @param mu the mean of the distribution + * @param sigma the standard deviation of the distribution + * @return the random Normal value */ public double nextGaussian(double mu, double sigma) { if (sigma <= 0) { @@ -312,11 +322,16 @@ public class RandomDataImpl implements RandomData, Serializable { } /** + * Returns a random value from an Exponential distribution with the given + * mean. + *

    * Algorithm Description: Uses the * - * Inversion Method to generate exponential from uniform deviates. - * @param mean the mean of the distribution. - * @return the random Exponential value. + * Inversion Method to generate exponentially distributed random values + * from uniform deviates. + * + * @param mean the mean of the distribution + * @return the random Exponential value */ public double nextExponential(double mean) { if (mean < 0.0) {