|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjsr166y.forkjoin.ParallelLongArray.WithLongMapping
jsr166y.forkjoin.ParallelLongArray.WithFilter
jsr166y.forkjoin.ParallelLongArray.WithBounds
public static final class ParallelLongArray.WithBounds
A restriction of parallel array operations to apply only within a given range of indices.
| Method Summary | ||
|---|---|---|
ParallelLongArray |
all()
Returns a new ParallelLongArray holding elements |
|
ParallelLongArray |
allUniqueElements()
Returns a new ParallelLongArray containing only unique elements (that is, without any duplicates). |
|
int |
anyIndex()
Returns the index of some element matching bound and filter constraints, or -1 if none. |
|
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,
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. |
|
ParallelLongArray |
combine(long[] other,
Ops.LongReducer combiner)
Returns a ParallelLongArray containing results of applying combine(thisElement, otherElement) for each element. |
|
|
combine(ParallelLongArray.WithBounds other,
Ops.LongReducer combiner)
Returns a ParallelLongArray containing results of applying combine(thisElement, otherElement) for each element. |
|
ParallelLongArray |
combine(ParallelLongArray other,
Ops.LongReducer combiner)
Returns a ParallelLongArray containing results of applying combine(thisElement, otherElement) for each element. |
|
void |
cumulate(Ops.LongReducer reducer,
long base)
Replaces each element with the running cumulation of applying the given reducer. |
|
void |
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 |
|
ParallelLongArray.WithFilter |
orFilter(Ops.LongPredicate selector)
Returns an operation prefix that causes a method to operate only on elements for which the current selector (if present) or the given selector returns true |
|
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. |
|
long |
precumulateSum()
Replaces each element with its prefix sum |
|
void |
removeAll()
Removes from the array all elements matching bound and/or filter constraints. |
|
void |
removeConsecutiveDuplicates()
Removes consecutive elements that are equal (or null), shifting others leftward, and possibly decreasing size. |
|
int |
size()
Return the number of elements selected using bound or filter restrictions. |
|
void |
sort()
Sorts the elements, assuming all elements are Comparable. |
|
void |
sort(Ops.LongComparator cmp)
Sorts the elements. |
|
ParallelLongArray.WithBounds |
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). |
|
ParallelLongArray.WithFilter |
withFilter(Ops.LongPredicate selector)
Returns an operation prefix that causes a method to operate only on elements for which the current selector (if present) and the given selector returns true |
|
ParallelLongArray.WithLongMapping |
withMapping(Ops.LongMapper mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
|
|
withMapping(Ops.MapperFromLong<? extends U> mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
|
ParallelLongArray.WithDoubleMapping |
withMapping(Ops.MapperFromLongToDouble 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 jsr166y.forkjoin.ParallelLongArray.WithFilter |
|---|
replaceWithCombination, replaceWithCombination, replaceWithCombination, replaceWithGeneratedValue, replaceWithMappedIndex, replaceWithTransform, replaceWithValue |
| Methods inherited from class jsr166y.forkjoin.ParallelLongArray.WithLongMapping |
|---|
apply, max, max, min, min, reduce, sum, summary, summary |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public ParallelLongArray.WithBounds withBounds(int firstIndex,
int upperBound)
firstIndex - the lower bound (inclusive)upperBound - the upper bound (exclusive)
public ParallelLongArray.WithFilter withFilter(Ops.LongPredicate selector)
ParallelLongArray.WithFilter
withFilter in class ParallelLongArray.WithFilterselector - the selector
public <U> ParallelLongArray.WithMapping<U> withMapping(Ops.MapperFromLong<? extends U> mapper)
ParallelLongArray.WithLongMapping
withMapping in class ParallelLongArray.WithLongMappingmapper - the mapper
public ParallelLongArray.WithLongMapping withMapping(Ops.LongMapper mapper)
ParallelLongArray.WithLongMapping
withMapping in class ParallelLongArray.WithLongMappingmapper - the mapper
public ParallelLongArray.WithDoubleMapping withMapping(Ops.MapperFromLongToDouble mapper)
ParallelLongArray.WithLongMapping
withMapping in class ParallelLongArray.WithLongMappingmapper - the mapper
public ParallelLongArray.WithFilter orFilter(Ops.LongPredicate selector)
ParallelLongArray.WithFilter
orFilter in class ParallelLongArray.WithFilterselector - the selector
public int anyIndex()
ParallelLongArray.WithLongMapping
anyIndex in class ParallelLongArray.WithLongMapping
public ParallelLongArray combine(long[] other,
Ops.LongReducer combiner)
other - the other arraycombiner - the combiner
java.lang.ArrayIndexOutOfBoundsException - if other array is
shorter than this array.
public ParallelLongArray combine(ParallelLongArray other,
Ops.LongReducer combiner)
other - the other arraycombiner - the combiner
java.lang.ArrayIndexOutOfBoundsException - if other array is
shorter than this array.
public <U,V> ParallelLongArray combine(ParallelLongArray.WithBounds other,
Ops.LongReducer combiner)
other - the other array segmentcombiner - the combiner
java.lang.ArrayIndexOutOfBoundsException - if other segment is
shorter than this array.public ParallelLongArray all()
ParallelLongArray.WithLongMapping
all in class ParallelLongArray.WithLongMappingpublic ParallelLongArray allUniqueElements()
ParallelLongArray.WithFilter
allUniqueElements in class ParallelLongArray.WithFilterpublic int indexOf(long target)
target - the element to search for
public int binarySearch(long target)
target - the element to search for
public int binarySearch(long target,
Ops.LongComparator comparator)
target - the element to search forcomparator - the comparator
public int size()
ParallelLongArray.WithLongMapping
size in class ParallelLongArray.WithLongMapping
public void cumulate(Ops.LongReducer reducer,
long base)
reducer - the reducerbase - the result for an empty arraypublic void cumulateSum()
public long precumulate(Ops.LongReducer reducer,
long base)
reducer - the reducerbase - the result for an empty array
public long precumulateSum()
public void sort(Ops.LongComparator cmp)
cmp - the comparator to usepublic void sort()
java.lang.ClassCastException - if any element is not Comparable.public void removeAll()
ParallelLongArray.WithFilter
removeAll in class ParallelLongArray.WithFilterpublic void removeConsecutiveDuplicates()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||