diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2011-02-10 10:17:42 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2011-02-10 10:17:42 +0000 |
commit | 5749084921c4868836d888bf6b0c3b28b094b09d (patch) | |
tree | b86f79128d09921f23782ca5864cb4ed6c0d1187 /src/library/scala/collection/parallel/Splitter.scala | |
parent | 854de25ee63e85c3bda6f0205f25b341458dd5f1 (diff) | |
download | scala-5749084921c4868836d888bf6b0c3b28b094b09d.tar.gz scala-5749084921c4868836d888bf6b0c3b28b094b09d.tar.bz2 scala-5749084921c4868836d888bf6b0c3b28b094b09d.zip |
Updated docs. No review.
Diffstat (limited to 'src/library/scala/collection/parallel/Splitter.scala')
-rw-r--r-- | src/library/scala/collection/parallel/Splitter.scala | 53 |
1 files changed, 31 insertions, 22 deletions
diff --git a/src/library/scala/collection/parallel/Splitter.scala b/src/library/scala/collection/parallel/Splitter.scala index e598b96c82..7328f3db6c 100644 --- a/src/library/scala/collection/parallel/Splitter.scala +++ b/src/library/scala/collection/parallel/Splitter.scala @@ -1,3 +1,12 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + + package scala.collection.parallel @@ -7,10 +16,10 @@ import scala.collection.Seq /** A splitter (or a split iterator) can be split into more splitters that traverse over * disjoint subsets of elements. * - * @tparam T type of the elements this parallel iterator traverses + * @tparam T type of the elements this splitter traverses * - * @since 2.8.1 - * @author prokopec + * @since 2.9 + * @author Aleksandar Prokopec */ trait Splitter[+T] extends Iterator[T] { @@ -19,13 +28,13 @@ trait Splitter[+T] extends Iterator[T] { * Returns a sequence of split iterators, each iterating over some subset of the * elements in the collection. These subsets are disjoint and should be approximately * equal in size. These subsets are not empty, unless the iterator is empty in which - * case this method returns a sequence with a single empty iterator. If the iterator has - * more than two elements, this method will return two or more iterators. + * case this method returns a sequence with a single empty iterator. If the splitter has + * more than two elements, this method will return two or more splitters. * - * Implementors are advised to keep this partition relatively small - two iterators are + * Implementors are advised to keep this partition relatively small - two splitters are * already enough when partitioning the collection, although there may be a few more. * - * '''Note:''' this method actually invalidates the current iterator. + * '''Note:''' this method actually invalidates the current splitter. * * @return a sequence of disjunct iterators of the collection */ @@ -59,37 +68,37 @@ object Splitter { * * Implementors might want to override the parameterless `split` method for efficiency. * - * @tparam T type of the elements this parallel iterator traverses + * @tparam T type of the elements this splitter traverses * - * @since 2.8.1 - * @author prokopec + * @since 2.9 + * @author Aleksandar Prokopec */ trait PreciseSplitter[+T] extends Splitter[T] { - /** Splits the iterator into disjunct views. + /** Splits the splitter into disjunct views. * - * This overloaded version of the `split` method is specific to precise parallel iterators. - * It returns a sequence of parallel iterators, each iterating some subset of the - * elements in this iterator. The sizes of the subiterators in the partition is equal to + * 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 - * iterator to split it that way. + * splitter to split it that way. * - * If there aren't enough elements, a zero element iterator is appended for each additional argument. - * If there are additional elements, an additional iterator is appended at the end to compensate. + * 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 parallel iterator `ps` with 100 elements. Invoking: + * 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 iterators, last two views being empty. On the other hand, calling: + * 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 iterators, last of them containing ten elements. + * will return a sequence of three splitters, last of them containing ten elements. * - * '''Note:''' this method actually invalidates the current iterator. + * '''Note:''' this method actually invalidates the current splitter. * - * Unlike the case with `split` found in parallel iterable iterators, views returned by this method can be empty. + * Unlike the case with `split` found in splitters, views returned by this method can be empty. * * @param sizes the sizes used to split this split iterator into iterators that traverse disjunct subsets * @return a sequence of disjunct subsequence iterators of this parallel iterator |