5 |
|
*/ |
6 |
|
|
7 |
|
package extra166y; |
8 |
+ |
|
9 |
|
import jsr166y.*; |
10 |
|
import static extra166y.Ops.*; |
11 |
|
import java.util.*; |
382 |
|
* 2, 3}, and the reducer operation adds numbers, then after |
383 |
|
* invocation of this method, the contents would be {@code 0, 1, |
384 |
|
* 3} (that is, {@code 0, 0+1, 0+1+2}, and the return value |
385 |
< |
* would be 6 (that is, {@code 1+2+3}). |
385 |
> |
* would be 6 (that is, {@code 1+2+3}). |
386 |
|
* @param reducer the reducer |
387 |
|
* @param base the result for an empty array |
388 |
|
* @return the total reduction |
407 |
|
* Sorts the array, assuming all elements are Comparable. Unlike |
408 |
|
* Arrays.sort, this sort does not guarantee that elements |
409 |
|
* with equal keys maintain their relative position in the array. |
409 |
– |
* @throws ClassCastException if any element is not Comparable |
410 |
|
* @return this (to simplify use in expressions) |
411 |
+ |
* @throws ClassCastException if any element is not Comparable |
412 |
|
*/ |
413 |
|
public ParallelDoubleArray sort() { |
414 |
|
super.sort(); |