Parallelizable
This trait describes collections which can be turned into parallel collections
by invoking the method par. Parallelizable collections may be parameterized with
a target type different than their own.
This trait describes collections which can be turned into parallel collections
by invoking the method par. Parallelizable collections may be parameterized with
a target type different than their own.
- Type Params
- A
the type of the elements in the collection
- ParRepr
the actual type of the collection, which has to be parallel
Value members
Abstract methods
Concrete methods
Returns a parallel implementation of this collection.
Returns a parallel implementation of this collection.
For most collection types, this method creates a new parallel collection by copying
all the elements. For these collection, par takes linear time. Mutable collections
in this category do not produce a mutable parallel collection that has the same
underlying dataset, so changes in one collection will not be reflected in the other one.
Specific collections (e.g. ParArray or mutable.ParHashMap) override this default
behaviour by creating a parallel collection which shares the same underlying dataset.
For these collections, par takes constant or sublinear time.
All parallel collections return a reference to themselves.
- Returns
a parallel implementation of this collection