Packages

c

de.sciss.kollflitz.Ops

KollFlitzSeqLike

implicit final class KollFlitzSeqLike[A, Repr] extends AnyVal

Enrichment methods for sequential collections.

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KollFlitzSeqLike
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KollFlitzSeqLike(self: SeqLike[A, Repr] with Repr)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clipAt(n: Int): A

    A variant of apply that clips the index around (0 until size).

    A variant of apply that clips the index around (0 until size). Throws an IndexOutOfBoundsException if the collection is empty.

    For example, List(2, 3, 4, 5).clipAt(-1) gives 2 and List(2, 3, 4, 5).clipAt(4) gives 5.

  6. def decimate[To](n: Int, offset: Int = 0)(implicit cbf: CanBuildFrom[Repr, A, To]): To

    The opposite of stutter - from every subsequent n elements, n - 1 will be dropped.

    The opposite of stutter - from every subsequent n elements, n - 1 will be dropped.

    For example, (1 to 10).decimate(2) produces Seq(1, 3, 5, 7, 9).

    To

    the result collection type

    n

    the number of times to repeat each element. If one or less, the output collection will have the same elements as the input collection.

    offset

    the number of initial elements to drop. This will be clipped to the range from zero to n - 1.

    cbf

    the result type builder factory

  7. def differentiate[To](implicit num: Numeric[A], cbf: CanBuildFrom[Repr, A, To]): To

    Differentiates the collection by calculating the pairwise difference of the elements.

    Differentiates the collection by calculating the pairwise difference of the elements.

    To

    the result collection type

    num

    the numerical view of the elements

    cbf

    the result type builder factory

    returns

    a new collection having a size one less than the input collection. the first element will be the different of the second and first element of the input sequence, etc.

  8. def foldAt(n: Int): A

    A variant of apply that folds (mirrors) the index around (0 until size).

    A variant of apply that folds (mirrors) the index around (0 until size). Throws an IndexOutOfBoundsException if the collection is empty.

    For example, List(2, 3, 4, 5).foldAt(-1) gives 3 and List(2, 3, 4, 5).foldAt(4) gives 4.

  9. def foreachPair(fun: (A, A) ⇒ Unit): Unit
  10. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  11. def groupWith[To](p: (A, A) ⇒ Boolean)(implicit cbf: CanBuildFrom[Repr, A, To]): Iterator[To]

    Clumps the collection into groups based on a predicate which determines if successive elements belong to the same group.

    Clumps the collection into groups based on a predicate which determines if successive elements belong to the same group.

    For example: {{ val x = List("a", "a", "b", "a", "b", "b") x.groupWith(_ == _).to[Vector] }}

    produces Vector(List("a", "a"), List("b"), List("a"), List("b", "b")).

    To

    the group type

    p

    a function which is evaluated with successive pairs of the input collection. As long as the predicate holds (the function returns true), elements are lumped together. When the predicate becomes false, a new group is started.

    cbf

    a builder factory for the group type

    returns

    an iterator over the groups.

  12. def integrate[To](implicit num: Numeric[A], cbf: CanBuildFrom[Repr, A, To]): To

    Integrates the collection by aggregating the elements step by step.

    Integrates the collection by aggregating the elements step by step.

    To

    the result collection type

    num

    the numerical view of the elements

    cbf

    the result type builder factory

    returns

    a new collection having the same size as the input collection. the first element will be identical to the first element in the input sequence, the second element will be the sum of the first and second element of the input sequence, etc.

  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def isSorted[B >: A](implicit ord: Ordering[B]): Boolean
  15. def isSortedBy[B](fun: (A) ⇒ B)(implicit ord: Ordering[B]): Boolean
  16. def mapPairs[B, To](fun: (A, A) ⇒ B)(implicit cbf: CanBuildFrom[Repr, B, To]): To
  17. def maxIndex[B >: A](implicit ord: Ordering[B]): Int

    Returns the index of the maximum element, according to the given Ordering.

    Returns the index of the maximum element, according to the given Ordering. Yields -1 if the collection is empty.

  18. def maxIndexBy[B >: A](f: (A) ⇒ B)(implicit ord: Ordering[B]): Int

    Returns the index of the maximum element, according to the given Ordering and a function f that maps each element to a value for comparison.

    Returns the index of the maximum element, according to the given Ordering and a function f that maps each element to a value for comparison. Yields -1 if the collection is empty.

  19. def minIndex[B >: A](implicit ord: Ordering[B]): Int

    Returns the index of the minimum element, according to the given Ordering.

    Returns the index of the minimum element, according to the given Ordering. Yields -1 if the collection is empty.

  20. def minIndexBy[B >: A](f: (A) ⇒ B)(implicit ord: Ordering[B]): Int

    Returns the index of the minimum element, according to the given Ordering and a function f that maps each element to a value for comparison.

    Returns the index of the minimum element, according to the given Ordering and a function f that maps each element to a value for comparison. Yields -1 if the collection is empty.

  21. def mirror[To](implicit cbf: CanBuildFrom[Repr, A, To]): To

    Concatenates this sequence with the tail of its reversed sequence.

    Concatenates this sequence with the tail of its reversed sequence.

    For example, List(1, 2, 3).mirror produces List(1, 2, 3, 2, 1)

    To

    the result collection type

    cbf

    the result type builder factory

  22. val self: SeqLike[A, Repr] with Repr
  23. def sortByT[B](f: (A) ⇒ B)(implicit ord: Ordering[B]): @@[Repr, Sorted]
  24. def sortWithT(lt: (A, A) ⇒ Boolean): @@[Repr, Sorted]
  25. def sortedT[B >: A](implicit ord: Ordering[B]): @@[Repr, Sorted]
  26. def stutter[To](n: Int)(implicit cbf: CanBuildFrom[Repr, A, To]): To

    Creates a new collection in which each element of the input collection is repeated n times.

    Creates a new collection in which each element of the input collection is repeated n times.

    For example, List(1, 2, 3).stutter(2) produces List(1, 1, 2, 2, 3, 3).

    To

    the result collection type

    n

    the number of times to repeat each element. If zero or less, the output collection will be empty.

    cbf

    the result type builder factory

  27. def toString(): String
    Definition Classes
    Any
  28. def wrapAt(n: Int): A

    A variant of apply that wraps the index around (0 until size).

    A variant of apply that wraps the index around (0 until size). Throws an IndexOutOfBoundsException if the collection is empty.

    For example, List(2, 3, 4, 5).wrapAt(-1) gives 5 and List(2, 3, 4, 5).wrapAt(4) gives 2.

Inherited from AnyVal

Inherited from Any

Ungrouped