public abstract class ParallelDoubleArrayWithBounds extends ParallelDoubleArrayWithFilter
| Modifier and Type | Method and Description |
|---|---|
abstract int |
binarySearch(double target)
Assuming this array is sorted, returns the index of an
element equal to given target, or -1 if not present.
|
abstract int |
binarySearch(double target,
Ops.DoubleComparator 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 ParallelDoubleArrayWithBounds |
cumulate(Ops.DoubleReducer reducer,
double base)
Replaces each element with the running cumulation of applying
the given reducer.
|
abstract ParallelDoubleArrayWithBounds |
cumulateSum()
Replaces each element with the running sum
|
abstract int |
indexOf(double target)
Returns the index of some element equal to given target,
or -1 if not present
|
abstract double |
precumulate(Ops.DoubleReducer reducer,
double base)
Replaces each element with the cumulation of applying the given
reducer to all previous values, and returns the total
reduction.
|
abstract double |
precumulateSum()
Replaces each element with its prefix sum
|
abstract ParallelDoubleArrayWithBounds |
sort()
Sorts the elements, assuming all elements are
Comparable.
|
abstract ParallelDoubleArrayWithBounds |
sort(Ops.DoubleComparator cmp)
Sorts the elements.
|
abstract ParallelDoubleArrayWithBounds |
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).
|
allUniqueElements, hasAllEqualElements, replaceWithGeneratedValue, replaceWithMappedIndex, replaceWithMappedIndex, replaceWithMapping, replaceWithMapping, replaceWithMapping, replaceWithValue, withFilter, withFilter, withIndexedFilterall, apply, max, max, min, min, reduce, sequentially, sum, summary, summary, withIndexedMapping, withIndexedMapping, withIndexedMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMappinganyIndex, isEmpty, sizepublic abstract ParallelDoubleArrayWithBounds withBounds(int firstIndex, int upperBound)
firstIndex - the lower bound (inclusive)upperBound - the upper bound (exclusive)public abstract int indexOf(double target)
target - the element to search forpublic abstract int binarySearch(double target)
target - the element to search forpublic abstract int binarySearch(double target,
Ops.DoubleComparator comparator)
target - the element to search forcomparator - the comparatorpublic abstract ParallelDoubleArrayWithBounds cumulate(Ops.DoubleReducer reducer, double base)
reducer - the reducerbase - the result for an empty arraypublic abstract ParallelDoubleArrayWithBounds cumulateSum()
public abstract double precumulate(Ops.DoubleReducer reducer, double base)
reducer - the reducerbase - the result for an empty arraypublic abstract double precumulateSum()
public abstract ParallelDoubleArrayWithBounds sort(Ops.DoubleComparator cmp)
cmp - the comparator to usepublic abstract ParallelDoubleArrayWithBounds sort()
java.lang.ClassCastException - if any element is not Comparable.