PreciseSplitter
A precise splitter (or a precise split iterator) can be split into arbitrary number of splitters that traverse disjoint subsets of arbitrary sizes.
A precise splitter (or a precise split iterator) can be split into arbitrary number of splitters that traverse disjoint subsets of arbitrary sizes.
Implementors might want to override the parameterless split
method for efficiency.
- Type Params
- T
type of the elements this splitter traverses
Type members
Inherited classlikes
Value members
Abstract methods
Splits the splitter into disjunct views.
Splits the splitter into disjunct views.
This overloaded version of the split
method is specific to precise splitters.
It returns a sequence of splitters, each iterating some subset of the
elements in this splitter. The sizes of the subsplitters in the partition is equal to
the size in the corresponding argument, as long as there are enough elements in this
splitter to split it that way.
If there aren't enough elements, a zero element splitter is appended for each additional argument. If there are additional elements, an additional splitter is appended at the end to compensate.
For example, say we have a splitter ps
with 100 elements. Invoking:
ps.split(50, 25, 25, 10, 5)
will return a sequence of five splitters, last two views being empty. On the other hand, calling:
ps.split(50, 40)
will return a sequence of three splitters, last of them containing ten elements.
'''Note:''' this method actually invalidates the current splitter.
Unlike the case with split
found in splitters, views returned by this method can be empty.
- Value Params
- sizes
the sizes used to split this split iterator into iterators that traverse disjunct subsets
- Returns
a sequence of disjunct subsequence iterators of this parallel iterator
Inherited methods
- Inherited from
- IterableOnceOps
- Inherited from
- IterableOnceOps
- Definition Classes
- Iterator -> IterableOnceOps
- Inherited from
- Iterator
- Inherited from
- Iterator
- Inherited from
- IterableOnceOps
Deprecated and Inherited methods
- Deprecated
- Inherited from
- IterableOnceOps
- Deprecated
- Inherited from
- IterableOnceOps
- Deprecated
- Inherited from
- IterableOnceOps
- Deprecated
- Definition Classes
- Iterator -> IterableOnceOps
- Inherited from
- Iterator
- Deprecated
- Inherited from
- Iterator
- Deprecated
- Inherited from
- IterableOnceOps