310 |
|
* to locate minimum and maximum elements. |
311 |
|
* @param comparator the comparator to use for |
312 |
|
* locating minimum and maximum elements |
313 |
< |
* @return the summary. |
313 |
> |
* @return the summary |
314 |
|
*/ |
315 |
|
public ParallelDoubleArray.SummaryStatistics summary |
316 |
|
(DoubleComparator comparator) { |
318 |
|
} |
319 |
|
|
320 |
|
/** |
321 |
< |
* Returns summary statistics, using natural comparator |
322 |
< |
* @return the summary. |
321 |
> |
* Returns summary statistics, using natural comparator. |
322 |
> |
* @return the summary |
323 |
|
*/ |
324 |
|
public ParallelDoubleArray.SummaryStatistics summary() { |
325 |
|
return super.summary(); |
326 |
|
} |
327 |
|
|
328 |
|
/** |
329 |
< |
* Returns the minimum element, or Double.MAX_VALUE if empty |
329 |
> |
* Returns the minimum element, or Double.MAX_VALUE if empty. |
330 |
|
* @param comparator the comparator |
331 |
|
* @return minimum element, or Double.MAX_VALUE if empty |
332 |
|
*/ |
335 |
|
} |
336 |
|
|
337 |
|
/** |
338 |
< |
* Returns the minimum element, or Double.MAX_VALUE if empty, |
338 |
> |
* Returns the minimum element, or Double.MAX_VALUE if empty. |
339 |
|
* @return minimum element, or Double.MAX_VALUE if empty |
340 |
|
*/ |
341 |
|
public double min() { |
343 |
|
} |
344 |
|
|
345 |
|
/** |
346 |
< |
* Returns the maximum element, or -Double.MAX_VALUE if empty |
346 |
> |
* Returns the maximum element, or -Double.MAX_VALUE if empty. |
347 |
|
* @param comparator the comparator |
348 |
|
* @return maximum element, or -Double.MAX_VALUE if empty |
349 |
|
*/ |
352 |
|
} |
353 |
|
|
354 |
|
/** |
355 |
< |
* Returns the maximum element, or -Double.MAX_VALUE if empty |
355 |
> |
* Returns the maximum element, or -Double.MAX_VALUE if empty. |
356 |
|
* @return maximum element, or -Double.MAX_VALUE if empty |
357 |
|
*/ |
358 |
|
public double max() { |
406 |
|
* Sorts the array, assuming all elements are Comparable. Unlike |
407 |
|
* Arrays.sort, this sort does not guarantee that elements |
408 |
|
* with equal keys maintain their relative position in the array. |
409 |
< |
* @throws ClassCastException if any element is not Comparable. |
409 |
> |
* @throws ClassCastException if any element is not Comparable |
410 |
|
* @return this (to simplify use in expressions) |
411 |
|
*/ |
412 |
|
public ParallelDoubleArray sort() { |
515 |
|
} |
516 |
|
|
517 |
|
/** |
518 |
< |
* Returns the sum of elements |
518 |
> |
* Returns the sum of elements. |
519 |
|
* @return the sum of elements |
520 |
|
*/ |
521 |
|
public double sum() { |
523 |
|
} |
524 |
|
|
525 |
|
/** |
526 |
< |
* Replaces each element with the running sum |
526 |
> |
* Replaces each element with the running sum. |
527 |
|
* @return this (to simplify use in expressions) |
528 |
|
*/ |
529 |
|
public ParallelDoubleArray cumulateSum() { |
532 |
|
} |
533 |
|
|
534 |
|
/** |
535 |
< |
* Replaces each element with its prefix sum |
535 |
> |
* Replaces each element with its prefix sum. |
536 |
|
* @return the total sum |
537 |
|
*/ |
538 |
|
public double precumulateSum() { |
555 |
|
/** |
556 |
|
* Returns an operation prefix that causes a method to operate |
557 |
|
* only on the elements of the array for which the given selector |
558 |
< |
* returns true |
558 |
> |
* returns true. |
559 |
|
* @param selector the selector |
560 |
|
* @return operation prefix |
561 |
|
*/ |
566 |
|
/** |
567 |
|
* Returns an operation prefix that causes a method to operate |
568 |
|
* only on elements for which the given binary selector returns |
569 |
< |
* true |
569 |
> |
* true. |
570 |
|
* @param selector the selector |
571 |
|
* @return operation prefix |
572 |
|
*/ |
579 |
|
/** |
580 |
|
* Returns an operation prefix that causes a method to operate |
581 |
|
* only on elements for which the given indexed selector returns |
582 |
< |
* true |
582 |
> |
* true. |
583 |
|
* @param selector the selector |
584 |
|
* @return operation prefix |
585 |
|
*/ |
626 |
|
* @param other the other array |
627 |
|
* @return operation prefix |
628 |
|
* @throws IllegalArgumentException if other array is a |
629 |
< |
* filtered view (all filters must precede all mappings). |
629 |
> |
* filtered view (all filters must precede all mappings) |
630 |
|
*/ |
631 |
|
public <V,W,X> ParallelDoubleArrayWithMapping<W> withMapping |
632 |
|
(DoubleAndObjectToObject<? super V, ? extends W> combiner, |
641 |
|
* @param other the other array |
642 |
|
* @return operation prefix |
643 |
|
* @throws IllegalArgumentException if other array is a |
644 |
< |
* filtered view (all filters must precede all mappings). |
644 |
> |
* filtered view (all filters must precede all mappings) |
645 |
|
*/ |
646 |
|
public <V> ParallelDoubleArrayWithMapping<V> withMapping |
647 |
|
(DoubleAndDoubleToObject<? extends V> combiner, |
656 |
|
* @param other the other array |
657 |
|
* @return operation prefix |
658 |
|
* @throws IllegalArgumentException if other array is a |
659 |
< |
* filtered view (all filters must precede all mappings). |
659 |
> |
* filtered view (all filters must precede all mappings) |
660 |
|
*/ |
661 |
|
public <V> ParallelDoubleArrayWithMapping<V> withMapping |
662 |
|
(DoubleAndLongToObject<? extends V> combiner, |
671 |
|
* @param other the other array |
672 |
|
* @return operation prefix |
673 |
|
* @throws IllegalArgumentException if other array is a |
674 |
< |
* filtered view (all filters must precede all mappings). |
674 |
> |
* filtered view (all filters must precede all mappings) |
675 |
|
*/ |
676 |
|
public <V,W> ParallelDoubleArrayWithDoubleMapping withMapping |
677 |
|
(DoubleAndObjectToDouble<? super V> combiner, |
686 |
|
* @param other the other array |
687 |
|
* @return operation prefix |
688 |
|
* @throws IllegalArgumentException if other array is a |
689 |
< |
* filtered view (all filters must precede all mappings). |
689 |
> |
* filtered view (all filters must precede all mappings) |
690 |
|
*/ |
691 |
|
public ParallelDoubleArrayWithDoubleMapping withMapping |
692 |
|
(BinaryDoubleOp combiner, |
701 |
|
* @param other the other array |
702 |
|
* @return operation prefix |
703 |
|
* @throws IllegalArgumentException if other array is a |
704 |
< |
* filtered view (all filters must precede all mappings). |
704 |
> |
* filtered view (all filters must precede all mappings) |
705 |
|
*/ |
706 |
|
public ParallelDoubleArrayWithDoubleMapping withMapping |
707 |
|
(DoubleAndLongToDouble combiner, |
716 |
|
* @param other the other array |
717 |
|
* @return operation prefix |
718 |
|
* @throws IllegalArgumentException if other array is a |
719 |
< |
* filtered view (all filters must precede all mappings). |
719 |
> |
* filtered view (all filters must precede all mappings) |
720 |
|
*/ |
721 |
|
public <V,W> ParallelDoubleArrayWithLongMapping withMapping |
722 |
|
(DoubleAndObjectToLong<? super V> combiner, |
731 |
|
* @param other the other array |
732 |
|
* @return operation prefix |
733 |
|
* @throws IllegalArgumentException if other array is a |
734 |
< |
* filtered view (all filters must precede all mappings). |
734 |
> |
* filtered view (all filters must precede all mappings) |
735 |
|
*/ |
736 |
|
public ParallelDoubleArrayWithLongMapping withMapping |
737 |
|
(DoubleAndDoubleToLong combiner, |
746 |
|
* @param other the other array |
747 |
|
* @return operation prefix |
748 |
|
* @throws IllegalArgumentException if other array is a |
749 |
< |
* filtered view (all filters must precede all mappings). |
749 |
> |
* filtered view (all filters must precede all mappings) |
750 |
|
*/ |
751 |
|
public ParallelDoubleArrayWithLongMapping withMapping |
752 |
|
(DoubleAndLongToLong combiner, |
799 |
|
* support the remove operation. However, a full |
800 |
|
* <tt>ListIterator</tt> supporting add, remove, and set |
801 |
|
* operations is available via {@link #asList}. |
802 |
< |
* @return an iterator stepping through each element. |
802 |
> |
* @return an iterator stepping through each element |
803 |
|
*/ |
804 |
|
public Iterator<Double> iterator() { |
805 |
|
return new ParallelDoubleArrayIterator(array, fence); |
886 |
|
* than the length of the underlying array, causes computations to |
887 |
|
* ignore elements past the given limit. |
888 |
|
* @param newLimit the new upper bound |
889 |
< |
* @throws IllegalArgumentException if newLimit less than zero. |
889 |
> |
* @throws IllegalArgumentException if newLimit less than zero |
890 |
|
*/ |
891 |
|
public final void setLimit(int newLimit) { |
892 |
|
if (newLimit < 0) |