24 |
|
} |
25 |
|
|
26 |
|
/** |
27 |
< |
* Applies the given procedure |
27 |
> |
* Applies the given procedure. |
28 |
|
* @param procedure the procedure |
29 |
|
*/ |
30 |
|
public void apply(LongProcedure procedure) { |
32 |
|
} |
33 |
|
|
34 |
|
/** |
35 |
< |
* Returns reduction of mapped elements |
35 |
> |
* Returns reduction of mapped elements. |
36 |
|
* @param reducer the reducer |
37 |
|
* @param base the result for an empty array |
38 |
|
* @return reduction |
45 |
|
} |
46 |
|
|
47 |
|
/** |
48 |
< |
* Returns the minimum element, or Long.MAX_VALUE if empty |
48 |
> |
* Returns the minimum element, or Long.MAX_VALUE if empty. |
49 |
|
* @return minimum element, or Long.MAX_VALUE if empty |
50 |
|
*/ |
51 |
|
public long min() { |
53 |
|
} |
54 |
|
|
55 |
|
/** |
56 |
< |
* Returns the minimum element, or Long.MAX_VALUE if empty |
56 |
> |
* Returns the minimum element, or Long.MAX_VALUE if empty. |
57 |
|
* @param comparator the comparator |
58 |
|
* @return minimum element, or Long.MAX_VALUE if empty |
59 |
|
*/ |
62 |
|
} |
63 |
|
|
64 |
|
/** |
65 |
< |
* Returns the maximum element, or Long.MIN_VALUE if empty |
65 |
> |
* Returns the maximum element, or Long.MIN_VALUE if empty. |
66 |
|
* @return maximum element, or Long.MIN_VALUE if empty |
67 |
|
*/ |
68 |
|
public long max() { |
70 |
|
} |
71 |
|
|
72 |
|
/** |
73 |
< |
* Returns the maximum element, or Long.MIN_VALUE if empty |
73 |
> |
* Returns the maximum element, or Long.MIN_VALUE if empty. |
74 |
|
* @param comparator the comparator |
75 |
|
* @return maximum element, or Long.MIN_VALUE if empty |
76 |
|
*/ |
79 |
|
} |
80 |
|
|
81 |
|
/** |
82 |
< |
* Returns the sum of elements |
82 |
> |
* Returns the sum of elements. |
83 |
|
* @return the sum of elements |
84 |
|
*/ |
85 |
|
public long sum() { |
87 |
|
} |
88 |
|
|
89 |
|
/** |
90 |
< |
* Returns summary statistics |
90 |
> |
* Returns summary statistics. |
91 |
|
* @param comparator the comparator to use for |
92 |
|
* locating minimum and maximum elements |
93 |
< |
* @return the summary. |
93 |
> |
* @return the summary |
94 |
|
*/ |
95 |
|
public ParallelLongArray.SummaryStatistics summary |
96 |
|
(LongComparator comparator) { |
101 |
|
} |
102 |
|
|
103 |
|
/** |
104 |
< |
* Returns summary statistics, using natural comparator |
105 |
< |
* @return the summary. |
104 |
> |
* Returns summary statistics, using natural comparator. |
105 |
> |
* @return the summary |
106 |
|
*/ |
107 |
|
public ParallelLongArray.SummaryStatistics summary() { |
108 |
|
return summary(CommonOps.naturalLongComparator()); |
109 |
|
} |
110 |
|
|
111 |
|
/** |
112 |
< |
* Returns a new ParallelLongArray holding mappings |
112 |
> |
* Returns a new ParallelLongArray holding mappings. |
113 |
|
* @return a new ParallelLongArray holding mappings |
114 |
|
*/ |
115 |
|
public ParallelLongArray all() { |
150 |
|
* @param other the other array |
151 |
|
* @return operation prefix |
152 |
|
* @throws IllegalArgumentException if other array is a |
153 |
< |
* filtered view (all filters must precede all mappings). |
153 |
> |
* filtered view (all filters must precede all mappings) |
154 |
|
*/ |
155 |
|
public <V,W,X> ParallelDoubleArrayWithMapping<W> withMapping |
156 |
|
(LongAndObjectToObject<? super V, ? extends W> combiner, |
166 |
|
* @param other the other array |
167 |
|
* @return operation prefix |
168 |
|
* @throws IllegalArgumentException if other array is a |
169 |
< |
* filtered view (all filters must precede all mappings). |
169 |
> |
* filtered view (all filters must precede all mappings) |
170 |
|
*/ |
171 |
|
public <V> ParallelDoubleArrayWithMapping<V> withMapping |
172 |
|
(LongAndDoubleToObject<? extends V> combiner, |
182 |
|
* @param other the other array |
183 |
|
* @return operation prefix |
184 |
|
* @throws IllegalArgumentException if other array is a |
185 |
< |
* filtered view (all filters must precede all mappings). |
185 |
> |
* filtered view (all filters must precede all mappings) |
186 |
|
*/ |
187 |
|
public <V> ParallelDoubleArrayWithMapping<V> withMapping |
188 |
|
(LongAndLongToObject<? extends V> combiner, |
198 |
|
* @param other the other array |
199 |
|
* @return operation prefix |
200 |
|
* @throws IllegalArgumentException if other array is a |
201 |
< |
* filtered view (all filters must precede all mappings). |
201 |
> |
* filtered view (all filters must precede all mappings) |
202 |
|
*/ |
203 |
|
public <V,W> ParallelDoubleArrayWithDoubleMapping withMapping |
204 |
|
(LongAndObjectToDouble<? super V> combiner, |
214 |
|
* @param other the other array |
215 |
|
* @return operation prefix |
216 |
|
* @throws IllegalArgumentException if other array is a |
217 |
< |
* filtered view (all filters must precede all mappings). |
217 |
> |
* filtered view (all filters must precede all mappings) |
218 |
|
*/ |
219 |
|
public ParallelDoubleArrayWithDoubleMapping withMapping |
220 |
|
(LongAndDoubleToDouble combiner, |
230 |
|
* @param other the other array |
231 |
|
* @return operation prefix |
232 |
|
* @throws IllegalArgumentException if other array is a |
233 |
< |
* filtered view (all filters must precede all mappings). |
233 |
> |
* filtered view (all filters must precede all mappings) |
234 |
|
*/ |
235 |
|
public ParallelDoubleArrayWithDoubleMapping withMapping |
236 |
|
(LongAndLongToDouble combiner, |
246 |
|
* @param other the other array |
247 |
|
* @return operation prefix |
248 |
|
* @throws IllegalArgumentException if other array is a |
249 |
< |
* filtered view (all filters must precede all mappings). |
249 |
> |
* filtered view (all filters must precede all mappings) |
250 |
|
*/ |
251 |
|
public <V,W> ParallelDoubleArrayWithLongMapping withMapping |
252 |
|
(LongAndObjectToLong<? super V> combiner, |
262 |
|
* @param other the other array |
263 |
|
* @return operation prefix |
264 |
|
* @throws IllegalArgumentException if other array is a |
265 |
< |
* filtered view (all filters must precede all mappings). |
265 |
> |
* filtered view (all filters must precede all mappings) |
266 |
|
*/ |
267 |
|
public ParallelDoubleArrayWithLongMapping withMapping |
268 |
|
(LongAndDoubleToLong combiner, |
278 |
|
* @param other the other array |
279 |
|
* @return operation prefix |
280 |
|
* @throws IllegalArgumentException if other array is a |
281 |
< |
* filtered view (all filters must precede all mappings). |
281 |
> |
* filtered view (all filters must precede all mappings) |
282 |
|
*/ |
283 |
|
public ParallelDoubleArrayWithLongMapping withMapping |
284 |
|
(BinaryLongOp combiner, |
326 |
|
/** |
327 |
|
* Returns an Iterable view to sequentially step through mapped |
328 |
|
* elements also obeying bound and filter constraints, without |
329 |
< |
* performing computations to evaluate them in parallel |
329 |
> |
* performing computations to evaluate them in parallel. |
330 |
|
* @return the Iterable view |
331 |
|
*/ |
332 |
|
public Iterable<Long> sequentially() { |