5 |
|
*/ |
6 |
|
|
7 |
|
package extra166y; |
8 |
+ |
|
9 |
|
import jsr166y.*; |
10 |
|
import static extra166y.Ops.*; |
11 |
|
import java.util.*; |
133 |
|
*/ |
134 |
|
Object[] ogetArray() { return null; } |
135 |
|
double[] dgetArray() { return null; } |
136 |
< |
long[] lgetArray() { return null; } |
136 |
> |
long[] lgetArray() { return null; } |
137 |
|
abstract Object oget(int index); |
138 |
|
abstract double dget(int index); |
139 |
|
abstract long lget(int index); |
276 |
|
/** |
277 |
|
* Shared support for select/map all -- probe filter, map, and |
278 |
|
* type to start selection driver, or do parallel mapping, or |
279 |
< |
* just copy, |
279 |
> |
* just copy. |
280 |
|
*/ |
281 |
|
final Object[] allObjects(Class elementType) { |
282 |
|
if (hasFilter()) { |
515 |
|
return new ORPap<T>(ex, origin, fence, array, selector); |
516 |
|
} |
517 |
|
|
518 |
< |
public <U> ParallelArrayWithMapping<T, U> withMapping |
518 |
> |
public <U> ParallelArrayWithMapping<T,U> withMapping |
519 |
|
(Op<? super T, ? extends U> op) { |
520 |
|
return new OUOMPap<T,U>(ex, origin, fence, array, op); |
521 |
|
} |
1171 |
|
compoundIndexedSelector(this.selector, selector)); |
1172 |
|
} |
1173 |
|
|
1174 |
< |
public <U> ParallelArrayWithMapping<T, U> withMapping |
1174 |
> |
public <U> ParallelArrayWithMapping<T,U> withMapping |
1175 |
|
(Op<? super T, ? extends U> op) { |
1176 |
|
return new OFOMPap<T,U>(ex, origin, fence, array, selector, op); |
1177 |
|
} |
1712 |
|
compoundIndexedSelector(this.selector, selector)); |
1713 |
|
} |
1714 |
|
|
1715 |
< |
public <U> ParallelArrayWithMapping<T, U> withMapping |
1715 |
> |
public <U> ParallelArrayWithMapping<T,U> withMapping |
1716 |
|
(Op<? super T, ? extends U> op) { |
1717 |
|
return new OROMPap<T,U>(ex, origin, fence, array, selector, op); |
1718 |
|
} |
2326 |
|
super(ex, origin, fence, array, op); |
2327 |
|
} |
2328 |
|
|
2329 |
< |
public <V> ParallelArrayWithMapping<T, V> withMapping |
2329 |
> |
public <V> ParallelArrayWithMapping<T,V> withMapping |
2330 |
|
(Op<? super U, ? extends V> op) { |
2331 |
|
return new OUOMPap<T,V>(ex, origin, fence, array, |
2332 |
|
CommonOps.compoundOp(this.op, op)); |
2520 |
|
boolean hasFilter() { return true; } |
2521 |
|
boolean isSelected(int i) { return selector.op(this.array[i]); } |
2522 |
|
|
2523 |
< |
public <V> ParallelArrayWithMapping<T, V> withMapping |
2523 |
> |
public <V> ParallelArrayWithMapping<T,V> withMapping |
2524 |
|
(Op<? super U, ? extends V> op) { |
2525 |
|
return new OFOMPap<T,V> |
2526 |
|
(ex, origin, fence, array, selector, |
2775 |
|
boolean hasFilter() { return true; } |
2776 |
|
boolean isSelected(int i) { return selector.op(i, this.array[i]); } |
2777 |
|
|
2778 |
< |
public <V> ParallelArrayWithMapping<T, V> withMapping |
2778 |
> |
public <V> ParallelArrayWithMapping<T,V> withMapping |
2779 |
|
(Op<? super U, ? extends V> op) { |
2780 |
|
return new OROMPap<T,V> |
2781 |
|
(ex, origin, fence, array, selector, |
3117 |
|
super(ex, origin, fence, array, op); |
3118 |
|
} |
3119 |
|
|
3120 |
< |
public <V> ParallelArrayWithMapping<T, V> withMapping |
3120 |
> |
public <V> ParallelArrayWithMapping<T,V> withMapping |
3121 |
|
(Op<? super U, ? extends V> op) { |
3122 |
|
return new OUOCPap<T,V>(ex, origin, fence, array, |
3123 |
|
compoundIndexedOp(this.op, op)); |
3311 |
|
boolean hasFilter() { return true; } |
3312 |
|
boolean isSelected(int i) { return selector.op(this.array[i]); } |
3313 |
|
|
3314 |
< |
public <V> ParallelArrayWithMapping<T, V> withMapping |
3314 |
> |
public <V> ParallelArrayWithMapping<T,V> withMapping |
3315 |
|
(Op<? super U, ? extends V> op) { |
3316 |
|
return new OFOCPap<T,V>(ex, origin, fence, array, selector, |
3317 |
|
compoundIndexedOp(this.op, op)); |
3554 |
|
boolean hasFilter() { return true; } |
3555 |
|
boolean isSelected(int i) { return selector.op(i, this.array[i]); } |
3556 |
|
|
3557 |
< |
public <V> ParallelArrayWithMapping<T, V> withMapping |
3557 |
> |
public <V> ParallelArrayWithMapping<T,V> withMapping |
3558 |
|
(Op<? super U, ? extends V> op) { |
3559 |
|
return new OROCPap<T,V>(ex, origin, fence, array, selector, |
3560 |
|
compoundIndexedOp(this.op, op)); |
3894 |
|
CommonOps.compoundOp(this.op, op)); |
3895 |
|
} |
3896 |
|
|
3897 |
< |
public <U> ParallelArrayWithMapping<T, U> withMapping |
3897 |
> |
public <U> ParallelArrayWithMapping<T,U> withMapping |
3898 |
|
(DoubleToObject<? extends U> op) { |
3899 |
|
return new OUOMPap<T,U>(ex, origin, fence, array, |
3900 |
|
CommonOps.compoundOp(this.op, op)); |
4082 |
|
CommonOps.compoundOp(this.op, op)); |
4083 |
|
} |
4084 |
|
|
4085 |
< |
public <U> ParallelArrayWithMapping<T, U> withMapping |
4085 |
> |
public <U> ParallelArrayWithMapping<T,U> withMapping |
4086 |
|
(DoubleToObject<? extends U> op) { |
4087 |
|
return new OFOMPap<T,U>(ex, origin, fence, array, selector, |
4088 |
|
CommonOps.compoundOp(this.op, op)); |
4318 |
|
CommonOps.compoundOp(this.op, op)); |
4319 |
|
} |
4320 |
|
|
4321 |
< |
public <U> ParallelArrayWithMapping<T, U> withMapping |
4321 |
> |
public <U> ParallelArrayWithMapping<T,U> withMapping |
4322 |
|
(DoubleToObject<? extends U> op) { |
4323 |
|
return new OROMPap<T,U>(ex, origin, fence, array, selector, |
4324 |
|
CommonOps.compoundOp(this.op, op)); |
4643 |
|
compoundIndexedOp(this.op, op)); |
4644 |
|
} |
4645 |
|
|
4646 |
< |
public <U> ParallelArrayWithMapping<T, U> withMapping |
4646 |
> |
public <U> ParallelArrayWithMapping<T,U> withMapping |
4647 |
|
(DoubleToObject<? extends U> op) { |
4648 |
|
return new OUOCPap<T,U>(ex, origin, fence, array, |
4649 |
|
compoundIndexedOp(this.op, op)); |
4830 |
|
compoundIndexedOp(this.op, op)); |
4831 |
|
} |
4832 |
|
|
4833 |
< |
public <U> ParallelArrayWithMapping<T, U> withMapping |
4833 |
> |
public <U> ParallelArrayWithMapping<T,U> withMapping |
4834 |
|
(DoubleToObject<? extends U> op) { |
4835 |
|
return new OFOCPap<T,U>(ex, origin, fence, array, selector, |
4836 |
|
compoundIndexedOp(this.op, op)); |
5068 |
|
compoundIndexedOp(this.op, op)); |
5069 |
|
} |
5070 |
|
|
5071 |
< |
public <U> ParallelArrayWithMapping<T, U> withMapping |
5071 |
> |
public <U> ParallelArrayWithMapping<T,U> withMapping |
5072 |
|
(DoubleToObject<? extends U> op) { |
5073 |
|
return new OROCPap<T,U>(ex, origin, fence, array, selector, |
5074 |
|
compoundIndexedOp(this.op, op)); |
5389 |
|
CommonOps.compoundOp(this.op, op)); |
5390 |
|
} |
5391 |
|
|
5392 |
< |
public <U> ParallelArrayWithMapping<T, U> withMapping |
5392 |
> |
public <U> ParallelArrayWithMapping<T,U> withMapping |
5393 |
|
(LongToObject<? extends U> op) { |
5394 |
|
return new OUOMPap<T,U>(ex, origin, fence, array, |
5395 |
|
CommonOps.compoundOp(this.op, op)); |
5578 |
|
CommonOps.compoundOp(this.op, op)); |
5579 |
|
} |
5580 |
|
|
5581 |
< |
public <U> ParallelArrayWithMapping<T, U> withMapping |
5581 |
> |
public <U> ParallelArrayWithMapping<T,U> withMapping |
5582 |
|
(LongToObject<? extends U> op) { |
5583 |
|
return new OFOMPap<T,U>(ex, origin, fence, array, selector, |
5584 |
|
CommonOps.compoundOp(this.op, op)); |
5818 |
|
CommonOps.compoundOp(this.op, op)); |
5819 |
|
} |
5820 |
|
|
5821 |
< |
public <U> ParallelArrayWithMapping<T, U> withMapping |
5821 |
> |
public <U> ParallelArrayWithMapping<T,U> withMapping |
5822 |
|
(LongToObject<? extends U> op) { |
5823 |
|
return new OROMPap<T,U>(ex, origin, fence, array, selector, |
5824 |
|
CommonOps.compoundOp(this.op, op)); |
6144 |
|
compoundIndexedOp(this.op, op)); |
6145 |
|
} |
6146 |
|
|
6147 |
< |
public <U> ParallelArrayWithMapping<T, U> withMapping |
6147 |
> |
public <U> ParallelArrayWithMapping<T,U> withMapping |
6148 |
|
(LongToObject<? extends U> op) { |
6149 |
|
return new OUOCPap<T,U>(ex, origin, fence, array, |
6150 |
|
compoundIndexedOp(this.op, op)); |
6329 |
|
compoundIndexedOp(this.op, op)); |
6330 |
|
} |
6331 |
|
|
6332 |
< |
public <U> ParallelArrayWithMapping<T, U> withMapping |
6332 |
> |
public <U> ParallelArrayWithMapping<T,U> withMapping |
6333 |
|
(LongToObject<? extends U> op) { |
6334 |
|
return new OFOCPap<T,U>(ex, origin, fence, array, |
6335 |
|
selector, |
6571 |
|
compoundIndexedOp(this.op, op)); |
6572 |
|
} |
6573 |
|
|
6574 |
< |
public <U> ParallelArrayWithMapping<T, U> withMapping |
6574 |
> |
public <U> ParallelArrayWithMapping<T,U> withMapping |
6575 |
|
(LongToObject<? extends U> op) { |
6576 |
|
return new OROCPap<T,U>(ex, origin, fence, array, |
6577 |
|
selector, |
6821 |
|
int cursor; |
6822 |
|
FilteredAsDoubleIterator() { |
6823 |
|
cursor = origin; |
6824 |
< |
advance() ; |
6824 |
> |
advance(); |
6825 |
|
} |
6826 |
|
private void advance() { |
6827 |
|
while (cursor < fence) { |
6874 |
|
int cursor; |
6875 |
|
FilteredAsLongIterator() { |
6876 |
|
cursor = origin; |
6877 |
< |
advance() ; |
6877 |
> |
advance(); |
6878 |
|
} |
6879 |
|
private void advance() { |
6880 |
|
while (cursor < fence) { |
6927 |
|
int cursor; |
6928 |
|
FilteredIterator() { |
6929 |
|
cursor = origin; |
6930 |
< |
advance() ; |
6930 |
> |
advance(); |
6931 |
|
} |
6932 |
|
private void advance() { |
6933 |
|
while (cursor < fence) { |