24 |
|
} |
25 |
|
|
26 |
|
/** |
27 |
< |
* Applies the given procedure |
27 |
> |
* Applies the given procedure. |
28 |
|
* @param procedure the procedure |
29 |
|
*/ |
30 |
|
public void apply(DoubleProcedure 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 Double.MAX_VALUE if empty |
48 |
> |
* Returns the minimum element, or Double.MAX_VALUE if empty. |
49 |
|
* @return minimum element, or Double.MAX_VALUE if empty |
50 |
|
*/ |
51 |
|
public double min() { |
53 |
|
} |
54 |
|
|
55 |
|
/** |
56 |
< |
* Returns the minimum element, or Double.MAX_VALUE if empty |
56 |
> |
* Returns the minimum element, or Double.MAX_VALUE if empty. |
57 |
|
* @param comparator the comparator |
58 |
|
* @return minimum element, or Double.MAX_VALUE if empty |
59 |
|
*/ |
62 |
|
} |
63 |
|
|
64 |
|
/** |
65 |
< |
* Returns the maximum element, or -Double.MAX_VALUE if empty |
65 |
> |
* Returns the maximum element, or -Double.MAX_VALUE if empty. |
66 |
|
* @return maximum element, or -Double.MAX_VALUE if empty |
67 |
|
*/ |
68 |
|
public double max() { |
70 |
|
} |
71 |
|
|
72 |
|
/** |
73 |
< |
* Returns the maximum element, or -Double.MAX_VALUE if empty |
73 |
> |
* Returns the maximum element, or -Double.MAX_VALUE if empty. |
74 |
|
* @param comparator the comparator |
75 |
|
* @return maximum element, or -Double.MAX_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 double 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 ParallelDoubleArray.SummaryStatistics summary |
96 |
|
(DoubleComparator 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 ParallelDoubleArray.SummaryStatistics summary() { |
108 |
|
return summary(CommonOps.naturalDoubleComparator()); |
109 |
|
} |
110 |
|
|
111 |
|
/** |
112 |
< |
* Returns a new ParallelDoubleArray holding mappings |
112 |
> |
* Returns a new ParallelDoubleArray holding mappings. |
113 |
|
* @return a new ParallelDoubleArray holding mappings |
114 |
|
*/ |
115 |
|
public ParallelDoubleArray 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> ParallelLongArrayWithMapping<W> withMapping |
156 |
|
(DoubleAndObjectToObject<? super V, ? extends W> combiner, |
167 |
|
* @param other the other array |
168 |
|
* @return operation prefix |
169 |
|
* @throws IllegalArgumentException if other array is a |
170 |
< |
* filtered view (all filters must precede all mappings). |
170 |
> |
* filtered view (all filters must precede all mappings) |
171 |
|
*/ |
172 |
|
public <V> ParallelLongArrayWithMapping<V> withMapping |
173 |
|
(DoubleAndDoubleToObject<? extends V> combiner, |
184 |
|
* @param other the other array |
185 |
|
* @return operation prefix |
186 |
|
* @throws IllegalArgumentException if other array is a |
187 |
< |
* filtered view (all filters must precede all mappings). |
187 |
> |
* filtered view (all filters must precede all mappings) |
188 |
|
*/ |
189 |
|
public <V> ParallelLongArrayWithMapping<V> withMapping |
190 |
|
(DoubleAndLongToObject<? extends V> combiner, |
201 |
|
* @param other the other array |
202 |
|
* @return operation prefix |
203 |
|
* @throws IllegalArgumentException if other array is a |
204 |
< |
* filtered view (all filters must precede all mappings). |
204 |
> |
* filtered view (all filters must precede all mappings) |
205 |
|
*/ |
206 |
|
public <V,W> ParallelLongArrayWithDoubleMapping withMapping |
207 |
|
(DoubleAndObjectToDouble<? super V> combiner, |
218 |
|
* @param other the other array |
219 |
|
* @return operation prefix |
220 |
|
* @throws IllegalArgumentException if other array is a |
221 |
< |
* filtered view (all filters must precede all mappings). |
221 |
> |
* filtered view (all filters must precede all mappings) |
222 |
|
*/ |
223 |
|
public ParallelLongArrayWithDoubleMapping withMapping |
224 |
|
(BinaryDoubleOp combiner, |
235 |
|
* @param other the other array |
236 |
|
* @return operation prefix |
237 |
|
* @throws IllegalArgumentException if other array is a |
238 |
< |
* filtered view (all filters must precede all mappings). |
238 |
> |
* filtered view (all filters must precede all mappings) |
239 |
|
*/ |
240 |
|
public ParallelLongArrayWithDoubleMapping withMapping |
241 |
|
(DoubleAndLongToDouble combiner, |
252 |
|
* @param other the other array |
253 |
|
* @return operation prefix |
254 |
|
* @throws IllegalArgumentException if other array is a |
255 |
< |
* filtered view (all filters must precede all mappings). |
255 |
> |
* filtered view (all filters must precede all mappings) |
256 |
|
*/ |
257 |
|
public <V,W> ParallelLongArrayWithLongMapping withMapping |
258 |
|
(DoubleAndObjectToLong<? super V> combiner, |
269 |
|
* @param other the other array |
270 |
|
* @return operation prefix |
271 |
|
* @throws IllegalArgumentException if other array is a |
272 |
< |
* filtered view (all filters must precede all mappings). |
272 |
> |
* filtered view (all filters must precede all mappings) |
273 |
|
*/ |
274 |
|
public ParallelLongArrayWithLongMapping withMapping |
275 |
|
(DoubleAndDoubleToLong combiner, |
286 |
|
* @param other the other array |
287 |
|
* @return operation prefix |
288 |
|
* @throws IllegalArgumentException if other array is a |
289 |
< |
* filtered view (all filters must precede all mappings). |
289 |
> |
* filtered view (all filters must precede all mappings) |
290 |
|
*/ |
291 |
|
public ParallelLongArrayWithLongMapping withMapping |
292 |
|
(DoubleAndLongToLong combiner, |
335 |
|
/** |
336 |
|
* Returns an Iterable view to sequentially step through mapped |
337 |
|
* elements also obeying bound and filter constraints, without |
338 |
< |
* performing computations to evaluate them in parallel |
338 |
> |
* performing computations to evaluate them in parallel. |
339 |
|
* @return the Iterable view |
340 |
|
*/ |
341 |
|
public Iterable<Double> sequentially() { |