Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 60AA0F78F for ; Sat, 30 Mar 2013 04:46:17 +0000 (UTC) Received: (qmail 32636 invoked by uid 500); 30 Mar 2013 04:46:16 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 32401 invoked by uid 500); 30 Mar 2013 04:46:16 -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 32356 invoked by uid 99); 30 Mar 2013 04:46:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Mar 2013 04:46:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.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; Sat, 30 Mar 2013 04:46:13 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 47F4323888E4; Sat, 30 Mar 2013 04:45:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1462702 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes: PollardRho.java Primes.java SmallPrimes.java Date: Sat, 30 Mar 2013 04:45:53 -0000 To: commits@commons.apache.org From: psteitz@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130330044553.47F4323888E4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: psteitz Date: Sat Mar 30 04:45:52 2013 New Revision: 1462702 URL: http://svn.apache.org/r1462702 Log: Javadoc fixes. Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes/PollardRho.java commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes/Primes.java commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes/SmallPrimes.java Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes/PollardRho.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes/PollardRho.java?rev=1462702&r1=1462701&r2=1462702&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes/PollardRho.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes/PollardRho.java Sat Mar 30 04:45:52 2013 @@ -63,9 +63,9 @@ class PollardRho { *

* This implementation follows the paper "An improved Monte Carlo factorization algorithm" * by Richard P. Brent. This avoids the triple computation of f(x) typically found in Pollard's - * rho implementations. It also batch several gcd computation into 1. + * rho implementations. It also batches several gcd computation into 1. *

- * The backtracking is not implemented as we deal only with semi-prime. + * The backtracking is not implemented as we deal only with semi-primes. * * @param n number to factor, must be semi-prime. * @return a prime factor of n. Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes/Primes.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes/Primes.java?rev=1462702&r1=1462701&r2=1462702&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes/Primes.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes/Primes.java Sat Mar 30 04:45:52 2013 @@ -44,7 +44,7 @@ public class Primes { /** * Primality test: tells if the argument is a (provable) prime or not. *

- * It uses the Miller-Rabin probabilistic test in such a way that result is always guaranteed: + * It uses the Miller-Rabin probabilistic test in such a way that a result is guaranteed: * it uses the firsts prime numbers as successive base (see Handbook of applied cryptography * by Menezes, table 4.1). * @@ -65,10 +65,10 @@ public class Primes { } /** - * Return the smallest prime superior or equal to n. + * Return the smallest prime greater than or equal to n. * * @param n a positive number. - * @return the smallest prime superior or equal to n. + * @return the smallest prime greater than or equal to n. * @throws MathIllegalArgumentException if n < 0. */ public static int nextPrime(int n) { Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes/SmallPrimes.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes/SmallPrimes.java?rev=1462702&r1=1462701&r2=1462702&view=diff ============================================================================== --- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes/SmallPrimes.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/primes/SmallPrimes.java Sat Mar 30 04:45:52 2013 @@ -31,7 +31,7 @@ import org.apache.commons.math3.util.Fas class SmallPrimes { /** - * The 512 firsts prime numbers. + * The first 512 prime numbers. *

* It contains all primes smaller or equal to the cubic square of Integer.MAX_VALUE. * As a result, int numbers which are not reduced by those primes are guaranteed @@ -93,7 +93,7 @@ class SmallPrimes { /** * Extract factors in the range PRIME_LAST+2 to maxFactors. * @param n the number to factorize, must be >= PRIME_LAST+2 and must not contain any factor below PRIME_LAST+2 - * @param maxFactor the upper bound of trial division: if it is reach, the methods gives up and return n. + * @param maxFactor the upper bound of trial division: if it is reached, the method gives up and returns n. * @param factors the list where to add the factors. * @return n or 1 if factorization is completed. */ @@ -122,7 +122,7 @@ class SmallPrimes { /** * Factorization by trial division. - * @param n the number to factorize + * @param n the number to factor * @return the list of prime factors of n */ public static List trialDivision(int n){ @@ -138,7 +138,7 @@ class SmallPrimes { } /** - * Miller-Rabin probabilistic primality test for int type, used in such a way that result is always guaranteed. + * Miller-Rabin probabilistic primality test for int type, used in such a way that a result is always guaranteed. *

* It uses the prime numbers as successive base therefore it is guaranteed to be always correct. * (see Handbook of applied cryptography by Menezes, table 4.1)