Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 38691 invoked from network); 14 Jun 2007 10:23:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Jun 2007 10:23:28 -0000 Received: (qmail 3653 invoked by uid 500); 14 Jun 2007 10:23:32 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 3635 invoked by uid 500); 14 Jun 2007 10:23:32 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 3626 invoked by uid 99); 14 Jun 2007 10:23:31 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jun 2007 03:23:31 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jun 2007 03:23:27 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 84CBC1A981A; Thu, 14 Jun 2007 03:23:07 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r547202 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Random.java Date: Thu, 14 Jun 2007 10:23:07 -0000 To: commits@harmony.apache.org From: odeakin@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070614102307.84CBC1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: odeakin Date: Thu Jun 14 03:23:02 2007 New Revision: 547202 URL: http://svn.apache.org/viewvc?view=rev&rev=547202 Log: Apply patch HARMONY-4160 ([classlib] [luni] Updated Javadoc for java.util.Random) Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Random.java Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Random.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Random.java?view=diff&rev=547202&r1=547201&r2=547202 ============================================================================== --- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Random.java (original) +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Random.java Thu Jun 14 03:23:02 2007 @@ -77,12 +77,14 @@ } /** - * Answers a pseudo-random uniformly distributed int value of - * the number of bits specified by the argument bits as - * described by Donald E. Knuth in The Art of Computer Programming, - * Volume 2: Seminumerical Algorithms, section 3.2.1. + * Returns a pseudo-random uniformly distributed int value of + * the number of bits specified by the argument bits. * - * @return int a pseudo-random generated int number + * Implements D. H. Lehmer's random number algorithm found in The Art of + * Computer Programming, Volume 2: Seminumerical Algorithms, by Donald + * E. Knuth (section 3.2.1). + * + * @return a pseudo-randomly generated int * @param bits * number of bits of the returned value * @@ -136,7 +138,7 @@ * Generates a normally distributed random double number between 0.0 * inclusively and 1.0 exclusively. * - * @return double + * @return a random double between 0.0 and 1.0 * * @see #nextFloat */ @@ -148,7 +150,7 @@ * Generates a normally distributed random float number between 0.0 * inclusively and 1.0 exclusively. * - * @return float a random float number between 0.0 and 1.0 + * @return a random float between 0.0 and 1.0 * * @see #nextDouble */ @@ -157,14 +159,15 @@ } /** - * pseudo-randomly generates (approximately) a normally distributed + * Returns a pseudo-randomly generated, normally distributed * double value with mean 0.0 and a standard deviation value - * of 1.0 using the polar method of G. E. P. Box, M. - * E. Muller, and G. Marsaglia, as described by Donald E. Knuth in The - * Art of Computer Programming, Volume 2: Seminumerical Algorithms, - * section 3.4.1, subsection C, algorithm P + * of 1.0. + * + * Implements G. E. P. Box, M. E. Muller, and G. Marsaglia's polar method + * found in The Art of Computer Programming, Volume 2: Seminumerical + * Algorithms, by Donald E. Knuth (section 3.4.1). * - * @return double + * @return a pseudo-randomly generated double * * @see #nextDouble */ @@ -194,7 +197,7 @@ * Generates a uniformly distributed 32-bit int value from * the this random number sequence. * - * @return int uniformly distributed int value + * @return a randomly generated int * * @see java.lang.Integer#MAX_VALUE * @see java.lang.Integer#MIN_VALUE @@ -206,13 +209,12 @@ } /** - * Returns to the caller a new pseudo-random integer value which is uniformly - * distributed between 0 (inclusively) and the value of n - * (exclusively). + * Returns a new pseudo-random integer value which is uniformly distributed + * between 0 (inclusively) and n (exclusively). * - * @return int + * @return a randomly generated int between 0 and n * @param n - * int + * the upper limit of the values that can be returned */ public int nextInt(int n) { if (n > 0) { @@ -246,8 +248,9 @@ } /** - * Modifies the seed using linear congruential formula presented in The - * Art of Computer Programming, Volume 2, Section 3.2.1. + * Modifies the seed using a linear congruential formula, as found in The + * Art of Computer Programming, Volume 2, by Donald E. Knuth (section + * 3.2.1). * * @param seed * the seed that alters the state of the random number generator