|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectgpars.AbstractPAWrapper
abstract class AbstractPAWrapper
Wraps a ParallelArray instance in map/reduce operation chains.
Property Summary | |
---|---|
def |
pa
The wrapper ParallelArray instance |
Constructor Summary | |
AbstractPAWrapper(def pa)
Creates an instance wrapping the supplied instance of ParallelArray |
Method Summary | |
---|---|
AbstractPAWrapper
|
filter(groovy.lang.Closure cl)
Filters concurrently elements in the collection based on the outcome of the supplied function on each of the elements. |
Object
|
getCollection()
Reconstructs a collection from the wrapped ParallelArray instance |
AbstractPAWrapper
|
map(groovy.lang.Closure cl)
Applies concurrently the supplied function to all elements in the collection, returning a collection containing the transformed values. |
Object
|
max()
Finds in parallel the maximum of all values in the collection. |
Object
|
max(groovy.lang.Closure cl)
Finds in parallel the maximum of all values in the collection. |
Object
|
min()
Finds in parallel the minimum of all values in the collection. |
Object
|
min(groovy.lang.Closure cl)
Finds in parallel the minimum of all values in the collection. |
Object
|
reduce(groovy.lang.Closure cl)
Performs a parallel reduce operation. |
Object
|
reduce(def seed, groovy.lang.Closure cl)
Performs a parallel reduce operation. |
int
|
size()
Size of the collection |
Object
|
sum()
Summarizes all elements of the collection in parallel using the "plus()" operator of the elements |
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Property Detail |
---|
final def pa
Constructor Detail |
---|
AbstractPAWrapper(def pa)
Method Detail |
---|
AbstractPAWrapper filter(groovy.lang.Closure cl)
A
- closure indicating whether to propagate the given element into the filtered collection
final Object getCollection()
final AbstractPAWrapper map(groovy.lang.Closure cl)
A
- closure calculating a transformed value from the original one
final Object max()
final Object max(groovy.lang.Closure cl)
cl
- A one or two-argument closure
final Object min()
final Object min(groovy.lang.Closure cl)
cl
- A one or two-argument closure
final Object reduce(groovy.lang.Closure cl)
cl
- A two-argument closure merging two elements into one. The return value of the closure will replace the original two elements.
final Object reduce(def seed, groovy.lang.Closure cl)
cl
- A two-argument closure merging two elements into one. The return value of the closure will replace the original two elements.
final int size()
final Object sum()
Groovy Documentation