commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
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 GMT
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 {
      * <p>
      * 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.
      * <p>
-     * 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.
      * <p>
-     * 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 &lt; 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.
      * <p>
      * It contains all primes smaller or equal to the cubic square of Integer.MAX_VALUE.
      * As a result, <code>int</code> numbers which are not reduced by those primes
are guaranteed
@@ -93,7 +93,7 @@ class SmallPrimes {
     /**
      * Extract factors in the range <code>PRIME_LAST+2</code> to <code>maxFactors</code>.
      * @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<Integer> 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.
      * <p>
      * 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)



Mime
View raw message