|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovyx.gpars.extra166y.AbstractParallelAnyArray groovyx.gpars.extra166y.AbstractParallelAnyArray.LPap groovyx.gpars.extra166y.ParallelLongArrayWithLongMapping groovyx.gpars.extra166y.ParallelLongArrayWithFilter groovyx.gpars.extra166y.ParallelLongArrayWithBounds
public abstract class ParallelLongArrayWithBounds
A prefix view of ParallelLongArray that causes operations to apply only to elements within a given range. Instances of this class may be constructed only via prefix methods of ParallelLongArray or its other prefix classes.
Nested Class Summary |
---|
Field Summary |
---|
Fields inherited from class groovyx.gpars.extra166y.AbstractParallelAnyArray.LPap |
---|
array |
Fields inherited from class groovyx.gpars.extra166y.AbstractParallelAnyArray |
---|
ex, fence, origin, threshold |
Constructor Summary | |
---|---|
ParallelLongArrayWithBounds(jsr166y.ForkJoinPool ex,
int origin,
int fence,
long[] array)
|
Method Summary | |
---|---|
abstract int |
binarySearch(long target)
Assuming this array is sorted, returns the index of an element equal to given target, or -1 if not present. |
abstract int |
binarySearch(long target,
Ops.LongComparator comparator)
Assuming this array is sorted with respect to the given comparator, returns the index of an element equal to given target, or -1 if not present. |
abstract ParallelLongArrayWithBounds |
cumulate(Ops.LongReducer reducer,
long base)
Replaces each element with the running cumulation of applying the given reducer. |
abstract ParallelLongArrayWithBounds |
cumulateSum()
Replaces each element with the running sum |
abstract int |
indexOf(long target)
Returns the index of some element equal to given target, or -1 if not present |
abstract long |
precumulate(Ops.LongReducer reducer,
long base)
Replaces each element with the cumulation of applying the given reducer to all previous values, and returns the total reduction. |
abstract long |
precumulateSum()
Replaces each element with its prefix sum |
abstract ParallelLongArrayWithBounds |
sort()
Sorts the elements, assuming all elements are Comparable. |
abstract ParallelLongArrayWithBounds |
sort(Ops.LongComparator cmp)
Sorts the elements. |
abstract ParallelLongArrayWithBounds |
withBounds(int firstIndex,
int upperBound)
Returns an operation prefix that causes a method to operate only on the elements of the array between firstIndex (inclusive) and upperBound (exclusive). |
Methods inherited from class groovyx.gpars.extra166y.ParallelLongArrayWithFilter |
---|
allUniqueElements, hasAllEqualElements, leafTransfer, leafTransferByIndex, lget, replaceWithGeneratedValue, replaceWithMappedIndex, replaceWithMappedIndex, replaceWithMapping, replaceWithMapping, replaceWithMapping, replaceWithValue, withFilter, withFilter, withIndexedFilter |
Methods inherited from class groovyx.gpars.extra166y.ParallelLongArrayWithLongMapping |
---|
all, apply, max, max, min, min, reduce, sequentially, sum, summary, summary, withIndexedMapping, withIndexedMapping, withIndexedMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping |
Methods inherited from class groovyx.gpars.extra166y.AbstractParallelAnyArray.LPap |
---|
dget, leafMoveByIndex, leafMoveSelected, lgetArray, oget |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
ParallelLongArrayWithBounds(jsr166y.ForkJoinPool ex, int origin, int fence, long[] array)
Method Detail |
---|
public abstract ParallelLongArrayWithBounds withBounds(int firstIndex, int upperBound)
firstIndex
- the lower bound (inclusive)upperBound
- the upper bound (exclusive)
public abstract int indexOf(long target)
target
- the element to search for
public abstract int binarySearch(long target)
target
- the element to search for
public abstract int binarySearch(long target, Ops.LongComparator comparator)
target
- the element to search forcomparator
- the comparator
public abstract ParallelLongArrayWithBounds cumulate(Ops.LongReducer reducer, long base)
reducer
- the reducerbase
- the result for an empty array
public abstract ParallelLongArrayWithBounds cumulateSum()
public abstract long precumulate(Ops.LongReducer reducer, long base)
reducer
- the reducerbase
- the result for an empty array
public abstract long precumulateSum()
public abstract ParallelLongArrayWithBounds sort(Ops.LongComparator cmp)
cmp
- the comparator to use
public abstract ParallelLongArrayWithBounds sort()
java.lang.ClassCastException
- if any element is not Comparable.
|
Copyright © 2008–2012 Václav Pech. All Rights Reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |