Class

de.sciss.patterns

PatOps

Related Doc: package patterns

Permalink

final class PatOps[A] extends AnyVal

PatOps are operations for patterns (Pat). Instead of having these operations directly defined in each pattern, which is a huge list, they appear here as extension methods.

See also

Pat

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

Instance Constructors

  1. new PatOps(x: Pat[A])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. def %[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  4. def &(that: Pat[A])(implicit num: NumInt[A]): Pat[A]

    Permalink
  5. def *[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  6. def +[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  7. def ++[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2]): Pat[A2]

    Permalink
  8. def +:[A1, A2](elem: A1)(implicit w: Widen2[A1, A, A2]): Pat[A2]

    Permalink
  9. def -[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  10. def /[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: NumFrac[A2]): Pat[A2]

    Permalink
  11. def :+[A1, A2](elem: A1)(implicit w: Widen2[A, A1, A2]): Pat[A2]

    Permalink
  12. def <(that: Pat[A])(implicit ord: Ord[A]): Pat[lucre.aux.Aux.Ord.Boolean]

    Permalink
  13. def <<(that: Pat[A])(implicit num: NumInt[A]): Pat[A]

    Permalink
  14. def <=(that: Pat[A])(implicit ord: Ord[A]): Pat[lucre.aux.Aux.Ord.Boolean]

    Permalink
  15. def <|[B](f: (Pat[A]) ⇒ Pat[B]): Pat[A]

    Permalink

    "Taps" into this pattern by appending a side-effect.

    "Taps" into this pattern by appending a side-effect. The returned pattern will invoke both the input stream and the stream produced from the side-effecting pattern produced by f, and then pass through the input stream's value. The side-effecting stream may end early, the compound stream keeps producing while the input stream has elements.

    Similar to runWith for standard Scala collections.

  16. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  17. def >(that: Pat[A])(implicit ord: Ord[A]): Pat[lucre.aux.Aux.Ord.Boolean]

    Permalink
  18. def >=(that: Pat[A])(implicit ord: Ord[A]): Pat[lucre.aux.Aux.Ord.Boolean]

    Permalink
  19. def >>(that: Pat[A])(implicit num: NumInt[A]): Pat[A]

    Permalink
  20. def >>>(that: Pat[A])(implicit num: NumInt[A]): Pat[A]

    Permalink
  21. def ^(that: Pat[A])(implicit num: NumInt[A]): Pat[A]

    Permalink
  22. def abs(implicit num: Num[A]): Pat[A]

    Permalink
  23. def absDif[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  24. def acos[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  25. def ampDb[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  26. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  27. def asin[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  28. def atan[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  29. def atan2[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: NumDouble[A2]): Pat[A2]

    Permalink
  30. def bubble: Pat[Pat[A]]

    Permalink

    Wraps each element in a singleton pattern.

    Wraps each element in a singleton pattern. For example, Pat(1, 2, 3) becomes Pat(Pat(1), Pat(2), Pat(3)).

  31. def bubbleMap(f: (Pat[A]) ⇒ Pat[A]): Pat[A]

    Permalink

    Short-hand for .bubble.map.flatten

  32. def ceil(implicit num: NumFrac[A]): Pat[A]

    Permalink
  33. def choose: Pat[A]

    Permalink

    Chooses a random single element from the input pattern.

  34. def clip2[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  35. def coin(implicit num: NumDouble[A]): Pat[lucre.aux.Aux.NumDouble.Boolean]

    Permalink
  36. def combinations(n: Pat[Int]): Pat[Pat[A]]

    Permalink
  37. def cos[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  38. def cosh[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  39. def cpsMidi[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  40. def cpsOct[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  41. def cubed(implicit num: Num[A]): Pat[A]

    Permalink
  42. def dbAmp[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  43. def difSqr[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  44. def differentiate(implicit num: Num[A]): Pat[A]

    Permalink
  45. def distinct: Pat[A]

    Permalink
  46. def drop(length: Pat[Int]): Pat[A]

    Permalink

    Drops the first length elements of the input pattern.

    Drops the first length elements of the input pattern. If the length is greater than the input pattern length, the result will be empty.

    E.g. Pat(4, 5, 6).drop(2) == Pat(6)

  47. def excess[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  48. def exp[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  49. def expExp[A1, A2](inLo: Pat[A], inHi: Pat[A], outLo: Pat[A1], outHi: Pat[A1])(implicit w: Widen2[A, A1, A2], num: NumDouble[A2]): Pat[A2]

    Permalink
  50. def expLin[A1, A2](inLo: Pat[A], inHi: Pat[A], outLo: Pat[A1], outHi: Pat[A1])(implicit w: Widen2[A, A1, A2], num: NumDouble[A2]): Pat[A2]

    Permalink
  51. def floor(implicit num: NumFrac[A]): Pat[A]

    Permalink
  52. def fold2[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  53. def frac(implicit num: NumFrac[A]): Pat[A]

    Permalink
  54. def gcd(that: Pat[A])(implicit num: NumInt[A]): Pat[A]

    Permalink
  55. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  56. def grouped(size: Pat[Int]): Pat[Pat[A]]

    Permalink
  57. def hold(): Pat[A]

    Permalink
  58. def hypot[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: NumDouble[A2]): Pat[A2]

    Permalink
  59. def hypotApx[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: NumDouble[A2]): Pat[A2]

    Permalink
  60. def indexOfSlice[B](that: Pat[B], from: Pat[Int]): Pat[Int]

    Permalink

    Finds first index after or at a start index where this pattern contains a given other pattern as a slice.

    Finds first index after or at a start index where this pattern contains a given other pattern as a slice.

    that

    the sequence to test

    from

    the start index

    returns

    the first index >= from such that the elements of this pattern starting at this index match the elements of pattern that, or -1 of no such subsequence exists.

  61. def indexOfSlice[B](that: Pat[B]): Pat[Int]

    Permalink

    Finds first index where this pattern contains a given other pattern as a slice.

    Finds first index where this pattern contains a given other pattern as a slice.

    that

    the sequence to test

    returns

    the first index such that the elements of this pattern starting at this index match the elements of pattern that, or -1 of no such subsequence exists.

  62. def indices: Pat[Int]

    Permalink
  63. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  64. def lcm(that: Pat[A])(implicit num: NumInt[A]): Pat[A]

    Permalink
  65. def length: Pat[Int]

    Permalink

    Yields the number of elements in the input pattern.

    Yields the number of elements in the input pattern.

    E.g. Pat(4, 5, 6).length == Pat(3)

  66. def linExp[A1, A2](inLo: Pat[A], inHi: Pat[A], outLo: Pat[A1], outHi: Pat[A1])(implicit w: Widen2[A, A1, A2], num: NumDouble[A2]): Pat[A2]

    Permalink
  67. def linLin[A1, A2](inLo: Pat[A], inHi: Pat[A], outLo: Pat[A1], outHi: Pat[A1])(implicit w: Widen2[A, A1, A2], num: NumFrac[A2]): Pat[A2]

    Permalink
  68. def log[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  69. def log10[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  70. def log2[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  71. def loop(n: Pat[Int] = Int.MaxValue): Pat[A]

    Permalink
  72. def max[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  73. def midiCps[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  74. def midiRatio[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  75. def min[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  76. def mod[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  77. def octCps[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  78. def poll(label: Pat[String] = "poll", gate: Pat[Boolean] = true): Pat[A]

    Permalink
  79. def pow[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: NumDouble[A2]): Pat[A2]

    Permalink
  80. def rand(implicit num: Num[A]): Pat[A]

    Permalink
  81. def rand2(implicit num: Num[A]): Pat[A]

    Permalink
  82. def ratioMidi[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  83. def reciprocal[B](implicit w: Widen[A, B], num: NumFrac[B]): Pat[B]

    Permalink
  84. def roundTo[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  85. def roundUpTo[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  86. def shuffle: Pat[A]

    Permalink

    Randomly changes the positions of the elements in the input pattern.

    Randomly changes the positions of the elements in the input pattern. Warning: the input must be finite.

  87. def sig_!=(that: Pat[A])(implicit eq: Eq[A]): Pat[Boolean]

    Permalink
  88. def sig_==(that: Pat[A])(implicit eq: Eq[A]): Pat[Boolean]

    Permalink
  89. def signum(implicit num: Num[A]): Pat[A]

    Permalink
  90. def sin[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  91. def sinh[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  92. def size: Pat[Int]

    Permalink

    Same as length.

  93. def sliding(size: Pat[Int], step: Pat[Int]): Pat[Pat[A]]

    Permalink
  94. def sliding(size: Pat[Int]): Pat[Pat[A]]

    Permalink
  95. def sorted(implicit ord: ScalarOrd[A]): Pat[A]

    Permalink
  96. def splitAt(index: Pat[Int]): (Pat[A], Pat[A])

    Permalink

    Shorthand for calling both take and drop.

  97. def sqrDif[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  98. def sqrSum[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  99. def sqrt[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  100. def squared(implicit num: Num[A]): Pat[A]

    Permalink
  101. def stutter(n: Pat[Int]): Pat[A]

    Permalink
  102. def sum(implicit num: Num[A]): Pat[A]

    Permalink
  103. def sumSqr[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  104. def tail: Pat[A]

    Permalink

    Drops the first element of the pattern.

    Drops the first element of the pattern.

    E.g. Pat(4, 5, 6).tail == Pat(5, 6).

  105. def take(length: Pat[Int] = 1): Pat[A]

    Permalink

    Takes only the length first elements of the input pattern, or less if the input pattern is shorter.

    Takes only the length first elements of the input pattern, or less if the input pattern is shorter.

    E.g. Pat(4, 5, 6).take(2) == Pat(4, 5)

  106. def tan[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  107. def tanh[B](implicit wd: WidenToDouble[A, B]): Pat[B]

    Permalink
  108. def toDouble(implicit to: ToNum[A]): Pat[Double]

    Permalink
  109. def toInt(implicit to: ToNum[A]): Pat[Int]

    Permalink
  110. def toString(): String

    Permalink
    Definition Classes
    Any
  111. def trunc[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  112. def unary_!(implicit num: NumBool[A]): Pat[A]

    Permalink
  113. def unary_-(implicit num: Num[A]): Pat[A]

    Permalink
  114. def unary_~(implicit num: NumInt[A]): Pat[A]

    Permalink
  115. def updated[B >: A](index: Pat[Int], elem: B): Pat[B]

    Permalink

    Updates a single element.

    Updates a single element. In other words, only one element from index and elem is ever read.

    E.g. Pat(4, 5, 6).updated(2, 7) == Pat(4, 5, 7)

  116. def updatedAll[B >: A](index: Pat[Int], elem: Pat[B]): Pat[B]

    Permalink

    Zips the indices with the elements, and then replaces these pairs.

    Zips the indices with the elements, and then replaces these pairs. Eagerly expands the entire input pattern.

    Be careful that this hang if both index and elem are constants!

  117. def wrap2[A1, A2](that: Pat[A1])(implicit w: Widen2[A, A1, A2], num: Num[A2]): Pat[A2]

    Permalink
  118. def zip[B](that: Pat[B]): Pat[(A, B)]

    Permalink
  119. def |(that: Pat[A])(implicit num: NumInt[A]): Pat[A]

    Permalink

Inherited from AnyVal

Inherited from Any

Ungrouped