|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object AbstractParallelAnyArray.LPap groovyx.gpars.extra166y.ParallelLongArrayWithLongMapping groovyx.gpars.extra166y.ParallelLongArrayWithFilter groovyx.gpars.extra166y.ParallelLongArrayWithBounds
public abstract class ParallelLongArrayWithBounds extends ParallelLongArrayWithFilter
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.
Constructor Summary | |
ParallelLongArrayWithBounds(ForkJoinPool ex, int origin, int fence, long[] array)
|
Method Summary | |
---|---|
int
|
binarySearch(long target)
Assuming this array is sorted, returns the index of an element equal to given target, or -1 if not present. |
int
|
binarySearch(long target, 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. |
ParallelLongArrayWithBounds
|
cumulate(LongReducer reducer, long base)
Replaces each element with the running cumulation of applying the given reducer. |
ParallelLongArrayWithBounds
|
cumulateSum()
Replaces each element with the running sum |
int
|
indexOf(long target)
Returns the index of some element equal to given target, or -1 if not present |
long
|
precumulate(LongReducer reducer, long base)
Replaces each element with the cumulation of applying the given reducer to all previous values, and returns the total reduction. |
long
|
precumulateSum()
Replaces each element with its prefix sum |
ParallelLongArrayWithBounds
|
sort(LongComparator cmp)
Sorts the elements. |
ParallelLongArrayWithBounds
|
sort()
Sorts the elements, assuming all elements are Comparable. |
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 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 |
Constructor Detail |
---|
ParallelLongArrayWithBounds(ForkJoinPool ex, int origin, int fence, long[] array)
Method Detail |
---|
public int binarySearch(long target)
target
- the element to search for
public int binarySearch(long target, LongComparator comparator)
target
- the element to search forcomparator
- the comparator
public ParallelLongArrayWithBounds cumulate(LongReducer reducer, long base)
reducer
- the reducerbase
- the result for an empty array
public ParallelLongArrayWithBounds cumulateSum()
public int indexOf(long target)
target
- the element to search for
public long precumulate(LongReducer reducer, long base)
reducer
- the reducerbase
- the result for an empty array
public long precumulateSum()
public ParallelLongArrayWithBounds sort(LongComparator cmp)
cmp
- the comparator to use
public ParallelLongArrayWithBounds sort()
public ParallelLongArrayWithBounds withBounds(int firstIndex, int upperBound)
firstIndex
- the lower bound (inclusive)upperBound
- the upper bound (exclusive)
Copyright © 2008–2012 Václav Pech. All Rights Reserved.