222 |
|
* Replaces elements with the results of applying the given |
223 |
|
* generator. For example, to fill the array with uniform random |
224 |
|
* values, use |
225 |
< |
* <tt>replaceWithGeneratedValue(Ops.doubleRandom())</tt>. |
225 |
> |
* {@code replaceWithGeneratedValue(Ops.doubleRandom())}. |
226 |
|
* @param generator the generator |
227 |
|
* @return this (to simplify use in expressions) |
228 |
|
*/ |
243 |
|
|
244 |
|
/** |
245 |
|
* Replaces elements with results of applying |
246 |
< |
* <tt>op(thisElement, otherElement)</tt>. |
246 |
> |
* {@code op(thisElement, otherElement)}. |
247 |
|
* @param other the other array |
248 |
|
* @param combiner the combiner |
249 |
|
* @return this (to simplify use in expressions) |
258 |
|
|
259 |
|
/** |
260 |
|
* Replaces elements with results of applying |
261 |
< |
* <tt>op(thisElement, otherElement)</tt>. |
261 |
> |
* {@code op(thisElement, otherElement)}. |
262 |
|
* @param other the other array |
263 |
|
* @param combiner the combiner |
264 |
|
* @return this (to simplify use in expressions) |
362 |
|
/** |
363 |
|
* Replaces each element with the running cumulation of applying |
364 |
|
* the given reducer. For example, if the contents are the numbers |
365 |
< |
* <tt>1, 2, 3</tt>, and the reducer operation adds numbers, then |
366 |
< |
* after invocation of this method, the contents would be <tt>1, |
367 |
< |
* 3, 6</tt> (that is, <tt>1, 1+2, 1+2+3</tt>); |
365 |
> |
* {@code 1, 2, 3}, and the reducer operation adds numbers, then |
366 |
> |
* after invocation of this method, the contents would be {@code 1, |
367 |
> |
* 3, 6} (that is, {@code 1, 1+2, 1+2+3}); |
368 |
|
* @param reducer the reducer |
369 |
|
* @param base the result for an empty array |
370 |
|
* @return this (to simplify use in expressions) |
377 |
|
/** |
378 |
|
* Replaces each element with the cumulation of applying the given |
379 |
|
* reducer to all previous values, and returns the total |
380 |
< |
* reduction. For example, if the contents are the numbers <tt>1, |
381 |
< |
* 2, 3</tt>, and the reducer operation adds numbers, then after |
382 |
< |
* invocation of this method, the contents would be <tt>0, 1, |
383 |
< |
* 3</tt> (that is, <tt>0, 0+1, 0+1+2</tt>, and the return value |
384 |
< |
* would be 6 (that is, <tt> 1+2+3</tt>); |
380 |
> |
* reduction. For example, if the contents are the numbers {@code 1, |
381 |
> |
* 2, 3}, and the reducer operation adds numbers, then after |
382 |
> |
* invocation of this method, the contents would be {@code 0, 1, |
383 |
> |
* 3} (that is, {@code 0, 0+1, 0+1+2}, and the return value |
384 |
> |
* would be 6 (that is, {@code 1+2+3}); |
385 |
|
* @param reducer the reducer |
386 |
|
* @param base the result for an empty array |
387 |
|
* @return the total reduction |
439 |
|
} |
440 |
|
|
441 |
|
/** |
442 |
< |
* Equivalent to <tt>asList().addAll</tt> but specialized for |
442 |
> |
* Equivalent to {@code asList().addAll} but specialized for |
443 |
|
* array arguments and likely to be more efficient. |
444 |
|
* @param other the elements to add |
445 |
|
* @return this (to simplify use in expressions) |
797 |
|
* Returns an iterator stepping through each element of the array |
798 |
|
* up to the current limit. This iterator does <em>not</em> |
799 |
|
* support the remove operation. However, a full |
800 |
< |
* <tt>ListIterator</tt> supporting add, remove, and set |
800 |
> |
* {@code ListIterator} supporting add, remove, and set |
801 |
|
* operations is available via {@link #asList}. |
802 |
|
* @return an iterator stepping through each element |
803 |
|
*/ |
872 |
|
public void set(int i, double x) { array[i] = x; } |
873 |
|
|
874 |
|
/** |
875 |
< |
* Equivalent to <tt>asList().toString()</tt>. |
875 |
> |
* Equivalent to {@code asList().toString()}. |
876 |
|
* @return a string representation |
877 |
|
*/ |
878 |
|
public String toString() { |