|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsr166z.forkjoin.ParallelIntArray.WithIntMapping jsr166z.forkjoin.ParallelIntArray.WithFilter jsr166z.forkjoin.ParallelIntArray.WithBounds
public static final class ParallelIntArray.WithBounds
A restriction of parallel array operations to apply only within a given range of indices.
Method Summary | ||
---|---|---|
int |
anyIndex()
Returns the index of some element matching bound filter constraints, or -1 if none. |
|
ParallelIntArray |
combine(int[] other,
{int,int=>int} combiner)
Returns a ParallelArray containing results of applying combine(thisElement, otherElement) for each element. |
|
ParallelIntArray |
combine(ParallelIntArray other,
{int,int=>int} combiner)
Returns a ParallelArray containing results of applying combine(thisElement, otherElement) for each element. |
|
void |
cumulate({int,int=>int} reducer,
int base)
Replaces each element with the running cumulation of applying the given reducer. |
|
void |
cumulateSum()
Replaces each element with the running sum |
|
ParallelIntArray |
newArray()
Returns a new ParallelArray holding elements |
|
int |
precumulate({int,int=>int} reducer,
int base)
Replaces each element with the cumulation of applying the given reducer to all previous values, and returns the total reduction. |
|
int |
precumulateSum()
Replaces each element with its prefix sum |
|
int |
size()
Returns the number of elements within bounds |
|
void |
sort()
Sorts the elements, using natural comparator |
|
void |
sort({int,int=>int} cmp)
Sorts the elements. |
|
ParallelIntArray.WithFilter |
withFilter({int=>boolean} selector)
Returns an operation prefix that causes a method to operate only on the elements of the array for which the given selector returns true |
|
ParallelIntArray.WithDoubleMapping |
withMapping({int=>double} mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
|
ParallelIntArray.WithIntMapping |
withMapping({int=>int} mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
|
ParallelIntArray.WithLongMapping |
withMapping({int=>long} mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
|
|
withMapping({int=>U} mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
Methods inherited from class jsr166z.forkjoin.ParallelIntArray.WithFilter |
---|
any, apply, indexOfMax, indexOfMax, indexOfMin, indexOfMin, max, max, min, min, randomFill, randomFill, reduce, replaceWithCombination, replaceWithCombination, replaceWithGeneratedValue, replaceWithMappedIndex, replaceWithTransform, replaceWithValue, sum |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public ParallelIntArray.WithFilter withFilter({int=>boolean} selector)
selector
- the selector
public <U> ParallelIntArray.WithMapping<U> withMapping({int=>U} mapper)
withMapping
in class ParallelIntArray.WithFilter
mapper
- the mapper
public ParallelIntArray.WithDoubleMapping withMapping({int=>double} mapper)
withMapping
in class ParallelIntArray.WithFilter
mapper
- the mapper
public ParallelIntArray.WithLongMapping withMapping({int=>long} mapper)
withMapping
in class ParallelIntArray.WithFilter
mapper
- the mapper
public ParallelIntArray.WithIntMapping withMapping({int=>int} mapper)
withMapping
in class ParallelIntArray.WithFilter
mapper
- the mapper
public int anyIndex()
anyIndex
in class ParallelIntArray.WithIntMapping
public ParallelIntArray combine(int[] other, {int,int=>int} combiner)
other
- the other arraycombiner
- the combiner
java.lang.ArrayIndexOutOfBoundsException
- if other array is
shorter than this array.public ParallelIntArray combine(ParallelIntArray other, {int,int=>int} combiner)
other
- the other arraycombiner
- the combiner
java.lang.ArrayIndexOutOfBoundsException
- if other array is
shorter than this array.public int size()
size
in class ParallelIntArray.WithIntMapping
public void cumulate({int,int=>int} reducer, int base)
reducer
- the reducerbase
- the result for an empty arraypublic void cumulateSum()
public int precumulate({int,int=>int} reducer, int base)
reducer
- the reducerbase
- the result for an empty array
public int precumulateSum()
public void sort({int,int=>int} cmp)
cmp
- the comparator to usepublic void sort()
public ParallelIntArray newArray()
ParallelIntArray.WithFilter
newArray
in class ParallelIntArray.WithFilter
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |