Packages

class ParArray[T] extends ParSeq[T] with GenericParTemplate[T, ParArray] with ParSeqLike[T, ParArray, ParArray[T], ArraySeq[T]] with Serializable

Parallel sequence holding elements in a linear array.

ParArray is a parallel sequence with a predefined size. The size of the array cannot be changed after it's been created.

ParArray internally keeps an array containing the elements. This means that bulk operations based on traversal ensure fast access to elements. ParArray uses lazy builders that create the internal data array only after the size of the array is known. In the meantime, they keep the result set fragmented. The fragments are copied into the resulting data array in parallel using fast array copy operations once all the combiners are populated in parallel.

T

type of the elements in the array

Self Type
ParArray[T]
Annotations
@SerialVersionUID()
Since

2.9

See also

Scala's Parallel Collections Library overview section on ParArray for more information.

Linear Supertypes
java.io.Serializable, ParSeq[T], parallel.ParSeq[T], ParSeqLike[T, [X]ParArray[X], ParArray[T], ArraySeq[T]], Equals, ParIterable[T], parallel.ParIterable[T], ParIterableLike[T, [X]ParArray[X], ParArray[T], ArraySeq[T]], Parallel, CustomParallelizable[T, ParArray[T]], Parallelizable[T, ParArray[T]], IterableOnce[T], GenericParTemplate[T, [X]ParArray[X]], HasNewCombiner[T, scala.collection.parallel.mutable.ParArray[T] @scala.annotation.unchecked.uncheckedVariance], GenericTraversableTemplate[T, [X]ParArray[X]], HasNewBuilder[T, scala.collection.parallel.mutable.ParArray[T] @scala.annotation.unchecked.uncheckedVariance], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ParArray
  2. Serializable
  3. ParSeq
  4. ParSeq
  5. ParSeqLike
  6. Equals
  7. ParIterable
  8. ParIterable
  9. ParIterableLike
  10. Parallel
  11. CustomParallelizable
  12. Parallelizable
  13. IterableOnce
  14. GenericParTemplate
  15. HasNewCombiner
  16. GenericTraversableTemplate
  17. HasNewBuilder
  18. AnyRef
  19. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ParArray(sz: Int)
  2. new ParArray(arr: ArraySeq[T])

Type Members

  1. trait BuilderOps[Elem, To] extends AnyRef
    Definition Classes
    ParIterableLike
  2. trait SignallingOps[PI <: DelegatedSignalling] extends AnyRef
    Definition Classes
    ParIterableLike
  3. trait TaskOps[R, Tp] extends AnyRef
    Definition Classes
    ParIterableLike
  4. class Map[S] extends Task[Unit, Map[S]]
  5. class ParArrayIterator extends SeqSplitter[T]
  6. type SSCTask[R, Tp] = StrictSplitterCheckTask[R, Tp]
    Definition Classes
    ParIterableLike
  7. class ScanToArray[U >: T] extends Task[Unit, ScanToArray[U]]

Value Members

  1. def ++[U >: T](that: scala.IterableOnce[U]): ParArray[U]
    Definition Classes
    ParIterableLike
  2. def +:[U >: T, That](elem: U): ParArray[U]
    Definition Classes
    ParSeqLike
  3. def /:[S](z: S)(op: (S, T) => S): S
    Definition Classes
    ParIterableLike
  4. def :+[U >: T, That](elem: U): ParArray[U]
    Definition Classes
    ParSeqLike
  5. def :\[S](z: S)(op: (T, S) => S): S
    Definition Classes
    ParIterableLike
  6. def aggregate[S](z: => S)(seqop: (S, T) => S, combop: (S, S) => S): S

    Aggregates the results of applying an operator to subsequent elements.

    Aggregates the results of applying an operator to subsequent elements.

    This is a more general form of fold and reduce. It has similar semantics, but does not require the result to be a supertype of the element type. It traverses the elements in different partitions sequentially, using seqop to update the result, and then applies combop to results from different partitions. The implementation of this operation may operate on an arbitrary number of collection partitions, so combop may be invoked arbitrary number of times.

    For example, one might want to process some elements and then produce a Set. In this case, seqop would process an element and append it to the set, while combop would concatenate two sets from different partitions together. The initial value z would be an empty set.

    pc.aggregate(Set[Int]())(_ += process(_), _ ++ _)

    Another example is calculating geometric mean from a collection of doubles (one would typically require big doubles for this).

    S

    the type of accumulated results

    z

    the initial value for the accumulated result of the partition - this will typically be the neutral element for the seqop operator (e.g. Nil for list concatenation or 0 for summation) and may be evaluated more than once

    seqop

    an operator used to accumulate results within a partition

    combop

    an associative operator used to combine results from different partitions

    Definition Classes
    ParIterableLike
  7. def apply(i: Int): T
    Definition Classes
    ParArrayParSeqParSeqLike
  8. val arrayseq: ArraySeq[T]
  9. def canEqual(other: Any): Boolean
    Definition Classes
    ParSeqLike → Equals
  10. def collect[S](pf: PartialFunction[T, S]): ParArray[S]
    Definition Classes
    ParIterableLike
  11. def companion: GenericParCompanion[ParArray]

    The factory companion object that builds instances of class ParArray.

    The factory companion object that builds instances of class ParArray. (or its Iterable superclass where class ParArray is not a Seq.)

    Definition Classes
    ParArrayParSeqParSeqParIterableParIterableParIterableLikeGenericParTemplateGenericTraversableTemplate
  12. def copyToArray[U >: T](xs: Array[U], start: Int, len: Int): Unit
    Definition Classes
    ParIterableLike
  13. def copyToArray[U >: T](xs: Array[U], start: Int): Unit
    Definition Classes
    ParIterableLike
  14. def copyToArray[U >: T](xs: Array[U]): Unit
    Definition Classes
    ParIterableLike
  15. def corresponds[S](that: parallel.ParSeq[S])(p: (T, S) => Boolean): Boolean

    Tests whether every element of this parallel iterable relates to the corresponding element of another parallel sequence by satisfying a test predicate.

    Tests whether every element of this parallel iterable relates to the corresponding element of another parallel sequence by satisfying a test predicate.

    This method will use abort signalling capabilities. This means that splitters may send and read abort signals.

    S

    the type of the elements of that

    that

    the other parallel sequence

    p

    the test predicate, which relates elements from both sequences

    returns

    true if both parallel sequences have the same length and p(x, y) is true for all corresponding elements x of this parallel iterable and y of that, otherwise false

    Definition Classes
    ParSeqLike
  16. def count(p: (T) => Boolean): Int
    Definition Classes
    ParIterableLike
  17. def debugBuffer: ArrayBuffer[String]
    Definition Classes
    ParIterableLike
  18. def diff[U >: T](that: Seq[U]): ParArray[T]
    Definition Classes
    ParSeqLike
  19. def diff[U >: T](that: parallel.ParSeq[U]): ParArray[T]
    Definition Classes
    ParSeqLike
  20. def distinct: ParArray[T]

    Builds a new parallel iterable from this parallel iterable without any duplicate elements.

    Builds a new parallel iterable from this parallel iterable without any duplicate elements.

    Note: will not terminate for infinite-sized collections.

    This trait defines a new, more general split operation and reimplements the split operation of ParallelIterable trait using the new split operation.

    returns

    A new parallel iterable which contains the first occurrence of every element of this parallel iterable.

    Definition Classes
    ParSeqLike
  21. def drop(n: Int): ParArray[T]
    Definition Classes
    ParIterableLike
  22. def dropWhile(pred: (T) => Boolean): ParArray[T]

    Drops all elements in the longest prefix of elements that satisfy the predicate, and returns a collection composed of the remaining elements.

    Drops all elements in the longest prefix of elements that satisfy the predicate, and returns a collection composed of the remaining elements.

    This method will use indexFlag signalling capabilities. This means that splitters may set and read the indexFlag state. The index flag is initially set to maximum integer value.

    pred

    the predicate used to test the elements

    returns

    a collection composed of all the elements after the longest prefix of elements in this parallel iterable that satisfy the predicate pred

    Definition Classes
    ParIterableLike
  23. def endsWith[S >: T](that: scala.Iterable[S]): Boolean

    Tests whether this parallel iterable ends with the given collection.

    Tests whether this parallel iterable ends with the given collection.

    This method will use abort signalling capabilities. This means that splitters may send and read abort signals.

    S

    the type of the elements of that sequence

    that

    the sequence to test

    returns

    true if this parallel iterable has that as a suffix, false otherwise

    Definition Classes
    ParSeqLike
  24. def endsWith[S >: T](that: parallel.ParSeq[S]): Boolean

    Tests whether this parallel iterable ends with the given parallel sequence.

    Tests whether this parallel iterable ends with the given parallel sequence.

    This method will use abort signalling capabilities. This means that splitters may send and read abort signals.

    S

    the type of the elements of that sequence

    that

    the sequence to test

    returns

    true if this parallel iterable has that as a suffix, false otherwise

    Definition Classes
    ParSeqLike
  25. def equals(that: Any): Boolean

    The equals method for arbitrary parallel sequences.

    The equals method for arbitrary parallel sequences. Compares this parallel sequence to some other object.

    that

    The object to compare the sequence to

    returns

    true if that is a sequence that has the same elements as this sequence in the same order, false otherwise

    Definition Classes
    ParSeqLike → Equals → AnyRef → Any
  26. def exists(p: (T) => Boolean): Boolean

    Tests whether a predicate holds for some element of this parallel iterable.

    Tests whether a predicate holds for some element of this parallel iterable.

    This method will use abort signalling capabilities. This means that splitters may send and read abort signals.

    p

    a predicate used to test elements

    returns

    true if p holds for some element, false otherwise

    Definition Classes
    ParIterableLike
  27. def filter(pred: (T) => Boolean): ParArray[T]
    Definition Classes
    ParIterableLike
  28. def filterNot(pred: (T) => Boolean): ParArray[T]
    Definition Classes
    ParIterableLike
  29. def find(p: (T) => Boolean): Option[T]

    Finds some element in the collection for which the predicate holds, if such an element exists.

    Finds some element in the collection for which the predicate holds, if such an element exists. The element may not necessarily be the first such element in the iteration order.

    If there are multiple elements obeying the predicate, the choice is nondeterministic.

    This method will use abort signalling capabilities. This means that splitters may send and read abort signals.

    p

    predicate used to test the elements

    returns

    an option value with the element if such an element exists, or None otherwise

    Definition Classes
    ParIterableLike
  30. def flatMap[S](f: (T) => scala.IterableOnce[S]): ParArray[S]
    Definition Classes
    ParIterableLike
  31. def flatten[B]: <error>

    [use case] Converts this parallel array of traversable collections into a parallel array formed by the elements of these traversable collections.

    [use case]

    Converts this parallel array of traversable collections into a parallel array formed by the elements of these traversable collections.

    The resulting collection's type will be guided by the static type of parallel array. For example:

    val xs = List(
               Set(1, 2, 3),
               Set(1, 2, 3)
             ).flatten
    // xs == List(1, 2, 3, 1, 2, 3)
    
    val ys = Set(
               List(1, 2, 3),
               List(3, 2, 1)
             ).flatten
    // ys == Set(1, 2, 3)
    B

    the type of the elements of each traversable collection.

    returns

    a new parallel array resulting from concatenating all element parallel arrays.

    Definition Classes
    GenericTraversableTemplate
    Full Signature

    def flatten[B](implicit asTraversable: (T) => scala.IterableOnce[B]): ParArray[B]

  32. def fold[U >: T](z: U)(op: (U, U) => U): U

    Folds the elements of this sequence using the specified associative binary operator.

    Folds the elements of this sequence using the specified associative binary operator. The order in which the elements are reduced is unspecified and may be nondeterministic.

    Note this method has a different signature than the foldLeft and foldRight methods of the trait Traversable. The result of folding may only be a supertype of this parallel collection's type parameter T.

    U

    a type parameter for the binary operator, a supertype of T.

    z

    a neutral element for the fold operation, it may be added to the result an arbitrary number of times, not changing the result (e.g. Nil for list concatenation, 0 for addition, or 1 for multiplication)

    op

    a binary operator that must be associative

    returns

    the result of applying fold operator op between all the elements and z

    Definition Classes
    ParIterableLike
  33. def foldLeft[S](z: S)(op: (S, T) => S): S
    Definition Classes
    ParIterableLike
  34. def foldRight[S](z: S)(op: (T, S) => S): S
    Definition Classes
    ParIterableLike
  35. def forall(p: (T) => Boolean): Boolean

    Tests whether a predicate holds for all elements of this parallel iterable.

    Tests whether a predicate holds for all elements of this parallel iterable.

    This method will use abort signalling capabilities. This means that splitters may send and read abort signals.

    p

    a predicate used to test elements

    returns

    true if p holds for all elements, false otherwise

    Definition Classes
    ParIterableLike
  36. def foreach[U](f: (T) => U): Unit

    Applies a function f to all the elements of parallel iterable in an undefined order.

    Applies a function f to all the elements of parallel iterable in an undefined order.

    U

    the result type of the function applied to each element, which is always discarded

    f

    function applied to each element

    Definition Classes
    ParIterableLike
  37. def genericBuilder[B]: Combiner[B, ParArray[B]]

    The generic builder that builds instances of $Coll at arbitrary element types.

    The generic builder that builds instances of $Coll at arbitrary element types.

    Definition Classes
    GenericParTemplateGenericTraversableTemplate
  38. def genericCombiner[B]: Combiner[B, ParArray[B]]
    Definition Classes
    GenericParTemplate
  39. def groupBy[K](f: (T) => K): immutable.ParMap[K, ParArray[T]]
    Definition Classes
    ParIterableLike
  40. def hasDefiniteSize: Boolean
    Definition Classes
    ParIterableLike
  41. def hashCode(): Int
    Definition Classes
    ParSeqLike → AnyRef → Any
  42. def head: T
    Definition Classes
    ParIterableLike
  43. def headOption: Option[T]
    Definition Classes
    ParIterableLike
  44. def indexOf[B >: T](elem: B, from: Int): Int

    Finds index of first occurrence of some value in this parallel iterable after or at some start index.

    Finds index of first occurrence of some value in this parallel iterable after or at some start index.

    B

    the type of the element elem.

    elem

    the element value to search for.

    from

    the start index

    returns

    the index >= from of the first element of this parallel iterable that is equal (as determined by ==) to elem, or -1, if none exists.

    Definition Classes
    ParSeqLike
  45. def indexOf[B >: T](elem: B): Int

    Finds index of first occurrence of some value in this parallel iterable.

    Finds index of first occurrence of some value in this parallel iterable.

    B

    the type of the element elem.

    elem

    the element value to search for.

    returns

    the index of the first element of this parallel iterable that is equal (as determined by ==) to elem, or -1, if none exists.

    Definition Classes
    ParSeqLike
  46. def indexWhere(p: (T) => Boolean, from: Int): Int

    Finds the first element satisfying some predicate.

    Finds the first element satisfying some predicate.

    This method will use indexFlag signalling capabilities. This means that splitters may set and read the indexFlag state.

    The index flag is initially set to maximum integer value.

    p

    the predicate used to test the elements

    from

    the starting offset for the search

    returns

    the index >= from of the first element of this parallel iterable that satisfies the predicate p, or -1, if none exists

    Definition Classes
    ParSeqLike
  47. def indexWhere(p: (T) => Boolean): Int

    Finds index of first element satisfying some predicate.

    Finds index of first element satisfying some predicate.

    Note: may not terminate for infinite-sized collections.

    p

    the predicate used to test elements.

    returns

    the index of the first element of this parallel iterable that satisfies the predicate p, or -1, if none exists.

    Definition Classes
    ParSeqLike
  48. def init: ParArray[T]
    Definition Classes
    ParIterableLike
  49. def intersect(that: scala.Seq[T]): ParArray[T]

    [use case] Computes the multiset intersection between this parallel array and another sequence.

    [use case]

    Computes the multiset intersection between this parallel array and another sequence.

    Note: may not terminate for infinite-sized collections.

    that

    the sequence of elements to intersect with.

    returns

    a new parallel array which contains all elements of this parallel array which also appear in that. If an element value x appears n times in that, then the first n occurrences of x will be retained in the result, but any following occurrences will be omitted.

    Definition Classes
    ParSeqLike
    Full Signature

    def intersect[U >: T](that: Seq[U]): ParArray[T]

  50. def isDefinedAt(idx: Int): Boolean

    Tests whether this parallel iterable contains given index.

    Tests whether this parallel iterable contains given index.

    The implementations of methods apply and isDefinedAt turn a ParSeq[T] into a PartialFunction[Int, T].

    idx

    the index to test

    returns

    true if this parallel iterable contains an element at position idx, false otherwise.

    Definition Classes
    ParSeqLike
  51. def isEmpty: Boolean
    Definition Classes
    ParIterableLike
  52. def isStrictSplitterCollection: Boolean

    Denotes whether this parallel collection has strict splitters.

    Denotes whether this parallel collection has strict splitters.

    This is true in general, and specific collection instances may choose to override this method. Such collections will fail to execute methods which rely on splitters being strict, i.e. returning a correct value in the remaining method.

    This method helps ensure that such failures occur on method invocations, rather than later on and in unpredictable ways.

    Definition Classes
    ParIterableLike
  53. final def isTraversableAgain: Boolean
    Definition Classes
    ParIterableLike
  54. def iterator: PreciseSplitter[T]

    Creates a new split iterator used to traverse the elements of this collection.

    Creates a new split iterator used to traverse the elements of this collection.

    By default, this method is implemented in terms of the protected splitter method.

    returns

    a split iterator

    Definition Classes
    ParSeqLikeParIterableLike → IterableOnce
  55. def knownSize: Int
    Definition Classes
    ParArray → IterableOnce
  56. def last: T
    Definition Classes
    ParIterableLike
  57. def lastIndexOf[B >: T](elem: B, end: Int): Int

    Finds index of last occurrence of some value in this parallel iterable before or at a given end index.

    Finds index of last occurrence of some value in this parallel iterable before or at a given end index.

    B

    the type of the element elem.

    elem

    the element value to search for.

    end

    the end index.

    returns

    the index <= end of the last element of this parallel iterable that is equal (as determined by ==) to elem, or -1, if none exists.

    Definition Classes
    ParSeqLike
  58. def lastIndexOf[B >: T](elem: B): Int

    Finds index of last occurrence of some value in this parallel iterable.

    Finds index of last occurrence of some value in this parallel iterable.

    Note: will not terminate for infinite-sized collections.

    This trait defines a new, more general split operation and reimplements the split operation of ParallelIterable trait using the new split operation.

    B

    the type of the element elem.

    elem

    the element value to search for.

    returns

    the index of the last element of this parallel iterable that is equal (as determined by ==) to elem, or -1, if none exists.

    Definition Classes
    ParSeqLike
  59. def lastIndexWhere(p: (T) => Boolean, end: Int): Int

    Finds the last element satisfying some predicate.

    Finds the last element satisfying some predicate.

    This method will use indexFlag signalling capabilities. This means that splitters may set and read the indexFlag state.

    The index flag is initially set to minimum integer value.

    p

    the predicate used to test the elements

    end

    the maximum offset for the search

    returns

    the index <= end of the first element of this parallel iterable that satisfies the predicate p, or -1, if none exists

    Definition Classes
    ParSeqLike
  60. def lastIndexWhere(p: (T) => Boolean): Int

    Finds index of last element satisfying some predicate.

    Finds index of last element satisfying some predicate.

    Note: will not terminate for infinite-sized collections.

    This trait defines a new, more general split operation and reimplements the split operation of ParallelIterable trait using the new split operation.

    p

    the predicate used to test elements.

    returns

    the index of the last element of this parallel iterable that satisfies the predicate p, or -1, if none exists.

    Definition Classes
    ParSeqLike
  61. def lastOption: Option[T]
    Definition Classes
    ParIterableLike
  62. def length: Int
    Definition Classes
    ParArrayParSeqLike
  63. def map[S](f: (T) => S): ParArray[S]
    Definition Classes
    ParArrayParIterableLike
  64. def max[U >: T](implicit ord: Ordering[U]): T
    Definition Classes
    ParIterableLike
  65. def maxBy[S](f: (T) => S)(implicit cmp: Ordering[S]): T
    Definition Classes
    ParIterableLike
  66. def min[U >: T](implicit ord: Ordering[U]): T
    Definition Classes
    ParIterableLike
  67. def minBy[S](f: (T) => S)(implicit cmp: Ordering[S]): T
    Definition Classes
    ParIterableLike
  68. def mkString: String
    Definition Classes
    ParIterableLike
  69. def mkString(sep: String): String
    Definition Classes
    ParIterableLike
  70. def mkString(start: String, sep: String, end: String): String
    Definition Classes
    ParIterableLike
  71. def nonEmpty: Boolean
    Definition Classes
    ParIterableLike
  72. def padTo[U >: T](len: Int, elem: U): ParArray[U]
    Definition Classes
    ParSeqLike
  73. def par: ParArray[T]

    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

    Definition Classes
    ParIterableLikeCustomParallelizableParallelizable
  74. def partition(pred: (T) => Boolean): (ParArray[T], ParArray[T])
    Definition Classes
    ParIterableLike
  75. def patch[U >: T](from: Int, patch: parallel.ParSeq[U], replaced: Int): ParArray[U]
    Definition Classes
    ParSeqLike
  76. def patch[U >: T](from: Int, patch: Seq[U], replaced: Int): ParArray[U]

    Overload of patch that takes a sequential collection as parameter

    Overload of patch that takes a sequential collection as parameter

    Definition Classes
    ParSeqLike
  77. def prefixLength(p: (T) => Boolean): Int

    Returns the length of the longest prefix whose elements all satisfy some predicate.

    Returns the length of the longest prefix whose elements all satisfy some predicate.

    Note: may not terminate for infinite-sized collections.

    p

    the predicate used to test elements.

    returns

    the length of the longest prefix of this parallel iterable such that every element of the segment satisfies the predicate p.

    Definition Classes
    ParSeqLike
  78. def product[U >: T](implicit num: Numeric[U]): U
    Definition Classes
    ParIterableLike
  79. def reduce[U >: T](op: (U, U) => U): U

    Reduces the elements of this sequence using the specified associative binary operator.

    Reduces the elements of this sequence using the specified associative binary operator.

    The order in which operations are performed on elements is unspecified and may be nondeterministic.

    Note this method has a different signature than the reduceLeft and reduceRight methods of the trait Traversable. The result of reducing may only be a supertype of this parallel collection's type parameter T.

    U

    A type parameter for the binary operator, a supertype of T.

    op

    A binary operator that must be associative.

    returns

    The result of applying reduce operator op between all the elements if the collection is nonempty.

    Definition Classes
    ParIterableLike
    Exceptions thrown

    UnsupportedOperationException if this parallel iterable is empty.

  80. def reduceLeft[U >: T](op: (U, T) => U): U
    Definition Classes
    ParIterableLike
  81. def reduceLeftOption[U >: T](op: (U, T) => U): Option[U]
    Definition Classes
    ParIterableLike
  82. def reduceOption[U >: T](op: (U, U) => U): Option[U]

    Optionally reduces the elements of this sequence using the specified associative binary operator.

    Optionally reduces the elements of this sequence using the specified associative binary operator.

    The order in which operations are performed on elements is unspecified and may be nondeterministic.

    Note this method has a different signature than the reduceLeftOption and reduceRightOption methods of the trait Traversable. The result of reducing may only be a supertype of this parallel collection's type parameter T.

    U

    A type parameter for the binary operator, a supertype of T.

    op

    A binary operator that must be associative.

    returns

    An option value containing result of applying reduce operator op between all the elements if the collection is nonempty, and None otherwise.

    Definition Classes
    ParIterableLike
  83. def reduceRight[U >: T](op: (T, U) => U): U
    Definition Classes
    ParIterableLike
  84. def reduceRightOption[U >: T](op: (T, U) => U): Option[U]
    Definition Classes
    ParIterableLike
  85. def repr: ParArray[T]
    Definition Classes
    ParIterableLike
  86. def reverse: ParArray[T]
    Definition Classes
    ParSeqLike
  87. def reverseMap[S](f: (T) => S): ParArray[S]
    Definition Classes
    ParSeqLike
  88. def sameElements[U >: T](that: scala.IterableOnce[U]): Boolean
    Definition Classes
    ParSeqLikeParIterableLike
  89. def scan[U >: T](z: U)(op: (U, U) => U): ParArray[U]

    Computes a prefix scan of the elements of the collection.

    Computes a prefix scan of the elements of the collection.

    Note: The neutral element z may be applied more than once.

    U

    element type of the resulting collection

    z

    neutral element for the operator op

    op

    the associative operator for the scan

    returns

    a new parallel array containing the prefix scan of the elements in this parallel array

    Definition Classes
    ParArrayParIterableLike
  90. def scanLeft[S](z: S)(op: (S, T) => S): scala.Iterable[S]
    Definition Classes
    ParIterableLike
  91. def scanRight[S](z: S)(op: (T, S) => S): scala.Iterable[S]
    Definition Classes
    ParIterableLike
  92. def segmentLength(p: (T) => Boolean, from: Int): Int

    Returns the length of the longest segment of elements starting at a given position satisfying some predicate.

    Returns the length of the longest segment of elements starting at a given position satisfying some predicate.

    This method will use indexFlag signalling capabilities. This means that splitters may set and read the indexFlag state.

    The index flag is initially set to maximum integer value.

    p

    the predicate used to test the elements

    from

    the starting offset for the search

    returns

    the length of the longest segment of elements starting at from and satisfying the predicate

    Definition Classes
    ParSeqLike
  93. def seq: ArraySeq[T]

    A sequential collection containing the same elements as this collection

    A sequential collection containing the same elements as this collection

    Definition Classes
    ParArrayParSeqParIterableParIterableLikeParallelizableGenericTraversableTemplate
  94. final def size: Int
    Definition Classes
    ParSeqLikeParIterableLike
  95. def slice(unc_from: Int, unc_until: Int): ParArray[T]
    Definition Classes
    ParIterableLike
  96. def span(pred: (T) => Boolean): (ParArray[T], ParArray[T])

    Splits this parallel iterable into a prefix/suffix pair according to a predicate.

    Splits this parallel iterable into a prefix/suffix pair according to a predicate.

    This method will use indexFlag signalling capabilities. This means that splitters may set and read the indexFlag state. The index flag is initially set to maximum integer value.

    pred

    the predicate used to test the elements

    returns

    a pair consisting of the longest prefix of the collection for which all the elements satisfy pred, and the rest of the collection

    Definition Classes
    ParIterableLike
  97. def splitAt(n: Int): (ParArray[T], ParArray[T])
    Definition Classes
    ParIterableLike
  98. def startsWith[S >: T](that: scala.IterableOnce[S], offset: Int = 0): Boolean

    Tests whether this parallel iterable contains the given sequence at a given index.

    Tests whether this parallel iterable contains the given sequence at a given index.

    This method will use abort signalling capabilities. This means that splitters may send and read abort signals.

    S

    the element type of that parallel sequence

    that

    the parallel sequence this sequence is being searched for

    offset

    the starting offset for the search

    returns

    true if there is a sequence that starting at offset in this sequence, false otherwise

    Definition Classes
    ParSeqLike
  99. def stepper[S <: Stepper[_]](implicit shape: StepperShape[T, S]): S
    Definition Classes
    IterableOnce
  100. def stringPrefix: String
    Definition Classes
    ParSeqParIterableParIterableLike
  101. def sum[U >: T](implicit num: Numeric[U]): U
    Definition Classes
    ParIterableLike
  102. def tail: ParArray[T]
    Definition Classes
    ParIterableLike
  103. def take(n: Int): ParArray[T]
    Definition Classes
    ParIterableLike
  104. def takeWhile(pred: (T) => Boolean): ParArray[T]

    Takes the longest prefix of elements that satisfy the predicate.

    Takes the longest prefix of elements that satisfy the predicate.

    This method will use indexFlag signalling capabilities. This means that splitters may set and read the indexFlag state. The index flag is initially set to maximum integer value.

    pred

    the predicate used to test the elements

    returns

    the longest prefix of this parallel iterable of elements that satisfy the predicate pred

    Definition Classes
    ParIterableLike
  105. def tasksupport: TaskSupport

    The task support object which is responsible for scheduling and load-balancing tasks to processors.

    The task support object which is responsible for scheduling and load-balancing tasks to processors.

    Definition Classes
    ParIterableLike
    See also

    scala.collection.parallel.TaskSupport

  106. def tasksupport_=(ts: TaskSupport): Unit

    Changes the task support object which is responsible for scheduling and load-balancing tasks to processors.

    Changes the task support object which is responsible for scheduling and load-balancing tasks to processors.

    A task support object can be changed in a parallel collection after it has been created, but only during a quiescent period, i.e. while there are no concurrent invocations to parallel collection methods.

    Here is a way to change the task support of a parallel collection:

    import scala.collection.parallel._
    val pc = mutable.ParArray(1, 2, 3)
    pc.tasksupport = new ForkJoinTaskSupport(
      new java.util.concurrent.ForkJoinPool(2))
    Definition Classes
    ParIterableLike
    See also

    scala.collection.parallel.TaskSupport

  107. def to[C](factory: Factory[T, C]): C
    Definition Classes
    ParIterableLike
  108. def toArray[U >: T](implicit arg0: ClassTag[U]): Array[U]
    Definition Classes
    ParIterableLike
  109. def toBuffer[U >: T]: Buffer[U]
    Definition Classes
    ParIterableLike
  110. def toIndexedSeq: immutable.IndexedSeq[T]
    Definition Classes
    ParIterableLike
  111. def toIterable: ParIterable[T]
    Definition Classes
    ParIterableParIterableLike
  112. def toIterator: scala.Iterator[T]
    Definition Classes
    ParIterableLike
  113. def toList: List[T]
    Definition Classes
    ParIterableLike
  114. def toMap[K, V](implicit ev: <:<[T, (K, V)]): immutable.ParMap[K, V]
    Definition Classes
    ParIterableLike
  115. def toSeq: ParSeq[T]
    Definition Classes
    ParSeqParSeqLikeParIterableParIterableLike
  116. def toSet[U >: T]: immutable.ParSet[U]
    Definition Classes
    ParIterableLike
  117. def toString(): String
    Definition Classes
    ParSeqParSeqLikeParIterableLike → AnyRef → Any
  118. def toVector: Vector[T]
    Definition Classes
    ParIterableLike
  119. def transpose[B](implicit asTraversable: (T) => scala.IterableOnce[B]): ParArray[ParArray[B]]

    Transposes this collection of traversable collections into a collection of collections.

    Transposes this collection of traversable collections into a collection of collections.

    The resulting collection's type will be guided by the static type of collection. For example:

    val xs = List(
               Set(1, 2, 3),
               Set(4, 5, 6)).transpose
    // xs == List(
    //         List(1, 4),
    //         List(2, 5),
    //         List(3, 6))
    
    val ys = Vector(
               List(1, 2, 3),
               List(4, 5, 6)).transpose
    // ys == Vector(
    //         Vector(1, 4),
    //         Vector(2, 5),
    //         Vector(3, 6))
    B

    the type of the elements of each traversable collection.

    asTraversable

    an implicit conversion which asserts that the element type of this collection is a Traversable.

    returns

    a two-dimensional collection of collections which has as nth row the nth column of this collection.

    Definition Classes
    GenericTraversableTemplate
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) transpose throws an IllegalArgumentException if collections are not uniformly sized.

    Exceptions thrown

    IllegalArgumentException if all collections in this collection are not of the same size.

  120. def union[B >: T](that: Seq[B]): ParArray[B]

    Overload of union that takes a sequential collection as parameter

    Overload of union that takes a sequential collection as parameter

    Definition Classes
    ParSeqLike
  121. def union[B >: T](that: parallel.ParSeq[B]): ParArray[B]

    Produces a new sequence which contains all elements of this parallel iterable and also all elements of a given sequence.

    Produces a new sequence which contains all elements of this parallel iterable and also all elements of a given sequence. xs union ys is equivalent to xs ++ ys.

    Another way to express this is that xs union ys computes the order-preserving multi-set union of xs and ys. union is hence a counter-part of diff and intersect which also work on multi-sets.

    Note: will not terminate for infinite-sized collections.

    This trait defines a new, more general split operation and reimplements the split operation of ParallelIterable trait using the new split operation.

    B

    the element type of the returned parallel iterable.

    that

    the sequence to add.

    returns

    a new parallel iterable which contains all elements of this parallel iterable followed by all elements of that.

    Definition Classes
    ParSeqLike
  122. def unzip[A1, A2](implicit asPair: (T) => (A1, A2)): (ParArray[A1], ParArray[A2])

    Converts this collection of pairs into two collections of the first and second half of each pair.

    Converts this collection of pairs into two collections of the first and second half of each pair.

    val xs = $Coll(
               (1, "one"),
               (2, "two"),
               (3, "three")).unzip
    // xs == ($Coll(1, 2, 3),
    //        $Coll(one, two, three))
    A1

    the type of the first half of the element pairs

    A2

    the type of the second half of the element pairs

    asPair

    an implicit conversion which asserts that the element type of this collection is a pair.

    returns

    a pair of collections, containing the first, respectively second half of each element pair of this collection.

    Definition Classes
    GenericTraversableTemplate
  123. def unzip3[A1, A2, A3](implicit asTriple: (T) => (A1, A2, A3)): (ParArray[A1], ParArray[A2], ParArray[A3])

    Converts this collection of triples into three collections of the first, second, and third element of each triple.

    Converts this collection of triples into three collections of the first, second, and third element of each triple.

    val xs = $Coll(
               (1, "one", '1'),
               (2, "two", '2'),
               (3, "three", '3')).unzip3
    // xs == ($Coll(1, 2, 3),
    //        $Coll(one, two, three),
    //        $Coll(1, 2, 3))
    A1

    the type of the first member of the element triples

    A2

    the type of the second member of the element triples

    A3

    the type of the third member of the element triples

    asTriple

    an implicit conversion which asserts that the element type of this collection is a triple.

    returns

    a triple of collections, containing the first, second, respectively third member of each element triple of this collection.

    Definition Classes
    GenericTraversableTemplate
  124. def update(i: Int, elem: T): Unit
    Definition Classes
    ParArrayParSeq
  125. def updated[U >: T](index: Int, elem: U): ParArray[U]
    Definition Classes
    ParSeqLike
  126. def withFilter(pred: (T) => Boolean): ParArray[T]
    Definition Classes
    ParIterableLike
  127. def zip[U >: T, S](that: parallel.ParIterable[S]): ParArray[(U, S)]
    Definition Classes
    ParSeqLikeParIterableLike
  128. def zip[U >: T, S](that: scala.Iterable[S]): ParArray[(U, S)]
    Definition Classes
    ParIterableLike
  129. def zipAll[S, U >: T](that: parallel.ParIterable[S], thisElem: U, thatElem: S): ParArray[(U, S)]
    Definition Classes
    ParIterableLike
  130. def zipWithIndex[U >: T]: ParArray[(U, Int)]

    Zips this parallel iterable with its indices.

    Zips this parallel iterable with its indices.

    U

    the type of the first half of the returned pairs (this is always a supertype of the collection's element type T).

    returns

    A new collection of type ParIterable containing pairs consisting of all elements of this parallel iterable paired with their index. Indices start at 0.

    Definition Classes
    ParIterableLike

Deprecated Value Members

  1. def toStream: Stream[T]
    Definition Classes
    ParIterableLike
    Annotations
    @deprecated
    Deprecated

    (Since version 0.1.3) Use to(LazyList) instead.

  2. def toTraversable: parallel.ParIterable[T]
    Definition Classes
    ParIterableLike
    Annotations
    @deprecated
    Deprecated

    (Since version 0.1.3) Use toIterable instead