1 |
|
/* |
2 |
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
|
* Expert Group and released to the public domain, as explained at |
4 |
< |
* http://creativecommons.org/licenses/publicdomain |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
|
|
7 |
|
package extra166y; |
41 |
|
|
42 |
|
/** |
43 |
|
* Returns the index of some element equal to given target, |
44 |
< |
* or -1 if not present |
44 |
> |
* or -1 if not present. |
45 |
|
* @param target the element to search for |
46 |
|
* @return the index or -1 if not present |
47 |
|
*/ |
78 |
|
public abstract ParallelDoubleArrayWithBounds cumulate(DoubleReducer reducer, double base); |
79 |
|
|
80 |
|
/** |
81 |
< |
* Replaces each element with the running sum |
81 |
> |
* Replaces each element with the running sum. |
82 |
|
* @return this (to simplify use in expressions) |
83 |
|
*/ |
84 |
|
public abstract ParallelDoubleArrayWithBounds cumulateSum(); |
94 |
|
public abstract double precumulate(DoubleReducer reducer, double base); |
95 |
|
|
96 |
|
/** |
97 |
< |
* Replaces each element with its prefix sum |
97 |
> |
* Replaces each element with its prefix sum. |
98 |
|
* @return the total sum |
99 |
|
*/ |
100 |
|
public abstract double precumulateSum(); |
114 |
|
* Comparable. Unlike Arrays.sort, this sort does not |
115 |
|
* guarantee that elements with equal keys maintain their relative |
116 |
|
* position in the array. |
117 |
< |
* @throws ClassCastException if any element is not Comparable. |
117 |
> |
* @throws ClassCastException if any element is not Comparable |
118 |
|
* @return this (to simplify use in expressions) |
119 |
|
*/ |
120 |
|
public abstract ParallelDoubleArrayWithBounds sort(); |
121 |
|
} |
122 |
– |
|