--- jsr166/src/extra166y/ParallelDoubleArrayWithDoubleMapping.java 2009/01/06 14:30:58 1.1 +++ jsr166/src/extra166y/ParallelDoubleArrayWithDoubleMapping.java 2015/01/18 20:17:32 1.5 @@ -1,10 +1,11 @@ /* * 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/ */ package extra166y; + import jsr166y.*; import static extra166y.Ops.*; import java.util.*; @@ -24,7 +25,7 @@ public abstract class ParallelDoubleArra } /** - * Applies the given procedure to elements + * Applies the given procedure to elements. * @param procedure the procedure */ public void apply(DoubleProcedure procedure) { @@ -32,7 +33,7 @@ public abstract class ParallelDoubleArra } /** - * Returns reduction of elements + * Returns reduction of elements. * @param reducer the reducer * @param base the result for an empty array * @return reduction @@ -45,7 +46,7 @@ public abstract class ParallelDoubleArra } /** - * Returns the minimum element, or Double.MAX_VALUE if empty + * Returns the minimum element, or Double.MAX_VALUE if empty. * @return minimum element, or Double.MAX_VALUE if empty */ public double min() { @@ -53,7 +54,7 @@ public abstract class ParallelDoubleArra } /** - * Returns the minimum element, or Double.MAX_VALUE if empty + * Returns the minimum element, or Double.MAX_VALUE if empty. * @param comparator the comparator * @return minimum element, or Double.MAX_VALUE if empty */ @@ -62,7 +63,7 @@ public abstract class ParallelDoubleArra } /** - * Returns the maximum element, or -Double.MAX_VALUE if empty + * Returns the maximum element, or -Double.MAX_VALUE if empty. * @return maximum element, or -Double.MAX_VALUE if empty */ public double max() { @@ -70,7 +71,7 @@ public abstract class ParallelDoubleArra } /** - * Returns the maximum element, or -Double.MAX_VALUE if empty + * Returns the maximum element, or -Double.MAX_VALUE if empty. * @param comparator the comparator * @return maximum element, or -Double.MAX_VALUE if empty */ @@ -79,7 +80,7 @@ public abstract class ParallelDoubleArra } /** - * Returns the sum of elements + * Returns the sum of elements. * @return the sum of elements */ public double sum() { @@ -87,10 +88,10 @@ public abstract class ParallelDoubleArra } /** - * Returns summary statistics + * Returns summary statistics. * @param comparator the comparator to use for * locating minimum and maximum elements - * @return the summary. + * @return the summary */ public ParallelDoubleArray.SummaryStatistics summary (DoubleComparator comparator) { @@ -101,15 +102,15 @@ public abstract class ParallelDoubleArra } /** - * Returns summary statistics, using natural comparator - * @return the summary. + * Returns summary statistics, using natural comparator. + * @return the summary */ public ParallelDoubleArray.SummaryStatistics summary() { return summary(CommonOps.naturalDoubleComparator()); } /** - * Returns a new ParallelDoubleArray holding elements + * Returns a new ParallelDoubleArray holding elements. * @return a new ParallelDoubleArray holding elements */ public ParallelDoubleArray all() { @@ -150,7 +151,7 @@ public abstract class ParallelDoubleArra * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelDoubleArrayWithMapping withMapping (DoubleAndObjectToObject combiner, @@ -167,7 +168,7 @@ public abstract class ParallelDoubleArra * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelDoubleArrayWithMapping withMapping (DoubleAndDoubleToObject combiner, @@ -184,7 +185,7 @@ public abstract class ParallelDoubleArra * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelDoubleArrayWithMapping withMapping (DoubleAndLongToObject combiner, @@ -201,7 +202,7 @@ public abstract class ParallelDoubleArra * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelDoubleArrayWithDoubleMapping withMapping (DoubleAndObjectToDouble combiner, @@ -218,7 +219,7 @@ public abstract class ParallelDoubleArra * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelDoubleArrayWithDoubleMapping withMapping (BinaryDoubleOp combiner, @@ -235,7 +236,7 @@ public abstract class ParallelDoubleArra * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelDoubleArrayWithDoubleMapping withMapping (DoubleAndLongToDouble combiner, @@ -252,7 +253,7 @@ public abstract class ParallelDoubleArra * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelDoubleArrayWithLongMapping withMapping (DoubleAndObjectToLong combiner, @@ -269,7 +270,7 @@ public abstract class ParallelDoubleArra * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelDoubleArrayWithLongMapping withMapping (DoubleAndDoubleToLong combiner, @@ -286,7 +287,7 @@ public abstract class ParallelDoubleArra * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelDoubleArrayWithLongMapping withMapping (DoubleAndLongToLong combiner, @@ -335,11 +336,10 @@ public abstract class ParallelDoubleArra /** * Returns an Iterable view to sequentially step through mapped * elements also obeying bound and filter constraints, without - * performing computations to evaluate them in parallel + * performing computations to evaluate them in parallel. * @return the Iterable view */ public Iterable sequentially() { return new SequentiallyAsDouble(); } } -