--- jsr166/src/test/loops/Integrate.java 2010/11/25 12:38:07 1.11 +++ jsr166/src/test/loops/Integrate.java 2013/01/28 17:38:50 1.16 @@ -1,7 +1,7 @@ /* * Written by Doug Lea with assistance from members of JCP JSR-166 * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/licenses/publicdomain + * http://creativecommons.org/publicdomain/zero/1.0/ */ import java.util.concurrent.*; @@ -11,7 +11,6 @@ import java.util.concurrent.*; * This version uses a simplified hardwired function. Inspired by a * * Filaments demo program. - * */ public final class Integrate { @@ -25,14 +24,15 @@ public final class Integrate { static int forkPolicy = DYNAMIC; static String forkArg = "dynamic"; - // the function to integrate + /** the function to integrate */ static double computeFunction(double x) { return (x * x + 1.0) * x; } static final double start = 0.0; static final double end = 1536.0; - /* + + /** * The number of recursive calls for * integrate from start to end. * (Empirically determined) @@ -63,7 +63,7 @@ public final class Integrate { } static void oneTest(int procs) { - ForkJoinPool g = procs == 0? new ForkJoinPool() : + ForkJoinPool g = (procs == 0) ? new ForkJoinPool() : new ForkJoinPool(procs); System.out.println("Number of procs=" + g.getParallelism()); System.out.println("Integrating from " + start + " to " + end + @@ -226,5 +226,3 @@ public final class Integrate { } } - -