|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsr166z.forkjoin.ParallelDoubleArray.WithDoubleMapping jsr166z.forkjoin.ParallelDoubleArray.WithFilter
public abstract static class ParallelDoubleArray.WithFilter
A restriction of parallel array operations to apply only to elements for which a selector returns true
Method Summary | ||
---|---|---|
double |
any()
Returns some element matching bound and filter constraints |
|
void |
apply({double=>void} procedure)
Applies the given procedure |
|
int |
indexOfMax()
Returns the index corresponding to the greatest element or -1 if empty, assuming that all elements are Comparables |
|
int |
indexOfMax({double,double=>int} comparator)
Returns the index corresponding to the greatest element, or -1 if empty |
|
int |
indexOfMin()
Returns the index corresponding to the least element or -1 if empty, assuming that all elements are Comparables |
|
int |
indexOfMin({double,double=>int} comparator)
Returns the index corresponding to the least element or -1 if empty |
|
double |
max()
Returns the maximum element, or -Double.MAX_VALUE if empty assuming that all elements are Comparables |
|
double |
max({double,double=>int} comparator)
Returns the maximum element, or -Double.MAX_VALUE if empty |
|
double |
min()
Returns the minimum element, or Double.MAX_VALUE if empty, assuming that all elements are Comparables |
|
double |
min({double,double=>int} comparator)
Returns the minimum element, or Double.MAX_VALUE if empty |
|
abstract ParallelDoubleArray |
newArray()
Returns a new ParallelArray holding elements |
|
void |
randomFill()
Sets each element to a uniform random value having the same properties as Random.nextDouble() |
|
double |
reduce({double,double=>double} reducer,
double base)
Returns reduction of elements |
|
void |
replaceWithCombination(double[] other,
{double,double=>double} combiner)
Replaces elements with results of applying combine(thisElement, otherElement) |
|
void |
replaceWithCombination(ParallelDoubleArray other,
{double,double=>double} combiner)
Replaces elements with results of applying combine(thisElement, otherElement) |
|
void |
replaceWithGeneratedValue({=>double} generator)
Replaces elements with results of applying the given generator. |
|
void |
replaceWithMappedIndex({int=>double} mapper)
Replaces elements with the results of applying the given mapper to their indices |
|
void |
replaceWithTransform({double=>double} mapper)
Replaces elements with the results of applying the given mapper to their current values. |
|
void |
replaceWithValue(double value)
Replaces elements with the given value. |
|
double |
sum()
Returns the sum of elements |
|
abstract ParallelDoubleArray.WithDoubleMapping |
withMapping({double=>double} mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
|
abstract ParallelDoubleArray.WithIntMapping |
withMapping({double=>int} mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
|
abstract ParallelDoubleArray.WithLongMapping |
withMapping({double=>long} mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
|
abstract
|
withMapping({double=>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.ParallelDoubleArray.WithDoubleMapping |
---|
anyIndex, size |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void apply({double=>void} procedure)
apply
in class ParallelDoubleArray.WithDoubleMapping
procedure
- the procedurepublic double reduce({double,double=>double} reducer, double base)
reduce
in class ParallelDoubleArray.WithDoubleMapping
reducer
- the reducerbase
- the result for an empty array
public double sum()
sum
in class ParallelDoubleArray.WithDoubleMapping
public double min({double,double=>int} comparator)
min
in class ParallelDoubleArray.WithDoubleMapping
comparator
- the comparator
public double min()
min
in class ParallelDoubleArray.WithDoubleMapping
public double max({double,double=>int} comparator)
max
in class ParallelDoubleArray.WithDoubleMapping
comparator
- the comparator
public double max()
max
in class ParallelDoubleArray.WithDoubleMapping
public int indexOfMin({double,double=>int} comparator)
indexOfMin
in class ParallelDoubleArray.WithDoubleMapping
comparator
- the comparator
public int indexOfMax({double,double=>int} comparator)
indexOfMax
in class ParallelDoubleArray.WithDoubleMapping
comparator
- the comparator
public int indexOfMin()
indexOfMin
in class ParallelDoubleArray.WithDoubleMapping
java.lang.ClassCastException
- if any element is not Comparable.public int indexOfMax()
indexOfMax
in class ParallelDoubleArray.WithDoubleMapping
java.lang.ClassCastException
- if any element is not Comparable.public abstract ParallelDoubleArray newArray()
newArray
in class ParallelDoubleArray.WithDoubleMapping
public void replaceWithTransform({double=>double} mapper)
mapper
- the mapperpublic void replaceWithMappedIndex({int=>double} mapper)
mapper
- the mapperpublic void replaceWithGeneratedValue({=>double} generator)
generator
- the generatorpublic void randomFill()
Random.nextDouble()
public void replaceWithValue(double value)
value
- the valuepublic void replaceWithCombination(ParallelDoubleArray other, {double,double=>double} combiner)
other
- the other arraycombiner
- the combiner
java.lang.ArrayIndexOutOfBoundsException
- if other array has
fewer than upperBound elements.public void replaceWithCombination(double[] other, {double,double=>double} combiner)
other
- the other arraycombiner
- the combiner
java.lang.ArrayIndexOutOfBoundsException
- if other array has
fewer than upperBound elements.public double any()
any
in class ParallelDoubleArray.WithDoubleMapping
java.util.NoSuchElementException
- if emptypublic abstract <U> ParallelDoubleArray.WithMapping<U> withMapping({double=>U} mapper)
mapper
- the mapper
public abstract ParallelDoubleArray.WithDoubleMapping withMapping({double=>double} mapper)
mapper
- the mapper
public abstract ParallelDoubleArray.WithLongMapping withMapping({double=>long} mapper)
mapper
- the mapper
public abstract ParallelDoubleArray.WithIntMapping withMapping({double=>int} mapper)
mapper
- the mapper
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |