ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/extra166y/ParallelLongArray.java
(Generate patch)

Comparing jsr166/src/extra166y/ParallelLongArray.java (file contents):
Revision 1.1 by dl, Tue Jan 6 14:30:58 2009 UTC vs.
Revision 1.2 by dl, Sat Sep 18 00:09:54 2010 UTC

# Line 21 | Line 21 | import java.lang.reflect.Array;
21   * Here is a complete (although naive) prime filter program:
22   * <pre>
23   * import java.math.BigInteger;
24 < * import jsr166y.forkjoin.*;
25 < * import static jsr166y.forkjoin.Ops.*;
26 < * import static jsr166y.forkjoin.ParallelLongArray.*;
24 > * import jsr166y.*;
25 > * import static extra166y.Ops.*;
26 > * import static extra166y.ParallelLongArray.*;
27   *
28   * public class Sieve {
29   *   public static void main(String[] args) {
# Line 47 | Line 47 | import java.lang.reflect.Array;
47   *   static LongPredicate notDivisibleBy(final long p) {
48   *     return new LongPredicate() {
49   *        public boolean op(long n) { return n &lt;= p || (n % p) != 0; }
50 < *     } }
50 > *     }; }
51   *   static LongPredicate notProbablePrime = new LongPredicate() {
52   *     private static final int CERTAINTY = 8;
53   *     public boolean op(long n) {
54   *       return !BigInteger.valueOf(n).isProbablePrime(CERTAINTY);
55   *     }
56 < *   }
56 > *   };
57   * }
58   * </pre>
59   */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines