c
scalqa

Stream.A.Doubles

abstract class _Class extends Stream[Double] with Stream.A.Basic.Defaults[Double]

Ordering
  1. Alphabetic
Inherited
  1. Doubles
  2. Stream.A.Basic.Defaults
  3. Stream
  4. Stream._info
  5. Stream._iterate
  6. Stream._consume
  7. Stream._consume._foreach
  8. Stream._consume._evaluate
  9. Stream._consume._convert
  10. Stream._consume._aggregate
  11. Stream._extend
  12. Stream._extend._trigger
  13. Stream._extend._zip
  14. Stream._extend._peek
  15. Stream._extend._order
  16. Stream._extend._map
  17. Stream._extend._group
  18. Stream._extend._flow
  19. Stream._extend._filter
  20. Stream._extend._add
  21. Stream.Flow
  22. Stream.Flow._info
  23. Stream.Flow._consume
  24. Stream.Flow._consume._foreach
  25. Stream.Flow._consume._evaluate
  26. Stream.Flow._consume._convert
  27. Stream.Flow._consume._aggregate
  28. Stream.Flow._extend
  29. Stream.Flow._extend._peek
  30. Stream.Flow._extend._map
  31. Stream.Flow._extend._flow
  32. Stream.Flow._extend._filter
  33. Stream.Flow._extend.Z.Shared
  34. Stream.Interface
  35. scala.AnyRef
  36. scala.Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Constructor

  1. new Doubles()
    Attributes
    protected
    Definition Classes
    _Class

Method

  1. def append(element: Double): ~[Double]

    Append

    Append

    Creates a new Stream with given element appended to this Stream

    (1 to 5).all.append(99).append(100).lp
    
    // Output
    ~(1, 2, 3, 4, 5, 99, 100)

    Note. append has operator alias '+'

    Definition Classes
    _Class_add
  2. def appendAll(that: ~[Double]): ~[Double]

    Append all

    Append all

    Creates a new Stream with that Stream appended to this Stream

    ('1' to '9').all.appendAll('a' to 'd').appendAll('A' to 'D').lp
    
    // Output
    ~(1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, A, B, C, D)
    Definition Classes
    _Class_add
  3. def apply(c: Consumer[Double], forEmpty: ⇒ Any = ()): Unit

    For each or for empty

    For each or for empty

    Calls foreach if there are elements

    Executes forEmpty otherwise

    Definition Classes
    _Class_foreach
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def average(implicit n: Numeric[Double]): Double

    Average

    Average

    Computes average

    (10 to 15).all.map(_.toFloat).average  // Returns 12.5
    Definition Classes
    _Class_aggregate
  6. def averageFew[B](f: Mapping[Double, B]*)(implicit arg0: Numeric[B]): Seq[B] with Util.Able.Void

    Multi average

    Multi average

    Simultaneously computes multiple average values for properties specified by several functions

    Returns Seq with values corresponding to the given mappings

    For empty pipelines returned Seq will still hold zero numerics, but will test isVoid==true

    (1 to 1000).all.averageFew(v => v, _ * 10, _ * 100).all.lp  // Prints ~(500, 5005, 50050)
    Definition Classes
    _Class_aggregate
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def collect[B](f: PartialFunction[Double, B])(implicit arg0: Tag[B]): Stream[B]

    Filter and converter

    Filter and converter

    Only lets elements for which given PartialFinction is defined

    The elements are converted to returned type

    def all = ~~[Any] + "ABC" + 1 + 22.0 + "DE" + 333F + "F"
    
    all.lp                                     // Prints ~(ABC, 1, 22.0, DE, 333.0, F)
    
    all.collect{
        case s: String if (s.length > 1) => s
    }.lp                                       // Prints ~(ABC, DE)

    Note. collect always requires double evaluation for each element, so letMap is preferred in many cases

    Definition Classes
    _Class_map_filter → Shared
  9. def collectOpt[B](f: PartialFunction[Double, B]): Opt[B]

    Find first matching option

    Find first matching option

    The matching element is mapped with the functions

    def stream = ~~[Any] + 1 + "ABC" + 22.0 + "DE" + 333F + "F"
    
    // Find length of the first matching string
    stream.collectOpt{
      case s: String if (s.length > 1) => s.length
    }.lp    // Prints: Opt(3)
    Definition Classes
    _Class_evaluate_evaluate
  10. def contains[B >: Double](value: B): Boolean

    Includes check

    Includes check

    Returns true if there is element equal to the given value

    def all: ~[Char] = 'a' to 'f'
    
    all.contains('c')       // Returns true
    
    all.contains('y')       // Returns false
    Definition Classes
    _Class_evaluate_evaluate
  11. def copyTo(b: Idx.Buffer.Loader[Double]): Unit

    Copy to buffer

    Copy to buffer

    This is potentially the most efficient way to get all Stream elements

    Idx.Buffer.Loader provides a trustless way to copy arrays in bulk, so many array based Streams can take advantage of this

    Definition Classes
    _Class_convert
  12. def count(f: Filter[Double]): Int

    Element conditional count

    Element conditional count

    Returns count of elements satisfying the filter

    Definition Classes
    _Class_evaluate_evaluate
  13. def count: Int

    All elements count

    All elements count

    Returns count of all elements

    ('a' to 'z').all.count  // Returns 26
    Definition Classes
    _Class_evaluate_evaluate
  14. def countAndSeconds: (Int, Double)

    Element count and time

    Element count and time

    Returns total count and time in seconds it took to pump the pipeline from first to last elements

    val (count, seconds) = (1 to 1000).all.peek(_ => Thread.sleep(1)).countAndSeconds
    
    println("Count = " + count + ", done in " + seconds + " secs")
    
    // Output
    Count = 1000, done in 1.004261423 secs
    Definition Classes
    _Class_evaluate
  15. def countFew(f: Filter[Double]*): Seq[Int]

    Element multi count

    Element multi count

    Counts elements for several filters at once

    Returns Seq, where each Int corresponds to the given filter index

    val Seq(total, odd, even) = (1 to 50).all.countFew(_ => true, _ % 2 == 1, _ % 2 == 0)
    
    println("total=" + total + ", odd=" + odd + ", even=" + even)
    
    // Output
    total=50, odd=25, even=25
    f

    several filters

    Definition Classes
    _Class_evaluate_evaluate
  16. def default(element: ⇒ Double): Stream[Double]

    Default element

    Default element

    If this Stream is empty, the given element will be appended

    Otherwise this Stream elements will not change

    (1 until 1).all.default(99).lp // Prints: ~(99)
    
    (1 until 5).all.default(99).lp // Prints: ~(1, 2, 3, 4)
    Definition Classes
    _Class_add
  17. def drain: Unit

    Discharge everything

    Discharge everything

    Calls foreach, discarding all retrieved elements

    Even though nothing is done at this point, this method can be run for the benefit of other functions in the pipeline

    ('A' to 'C').all.peek(v => println("Process " + v)).drain
    
    // Output
    Process A
    Process B
    Process C
    Definition Classes
    _Class_foreach
  18. def drop(f: Filter[Double]): Stream[Double]

    Reversed filter

    Reversed filter

    Discards all the elements satisfying the filter

    (1 to 10).all.drop(_ % 2 == 0).lp // Prints: ~(1, 3, 5, 7, 9)
    Definition Classes
    _Class_filter_filter
  19. def dropAll(a: ~[Double])(implicit o: Ordering[Double] = null): Stream[Double]

    Group reversed filter

    Group reversed filter

    Discards all elements equal to the found in that stream

    val idx = (1 to 5).all.flatMap(i => Seq(i, i, i)).to[Idx]
    
    idx.all.lp                         // Prints: ~(1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5)
    
    idx.all.dropAll(3 to 7).lp         // Prints: ~(1, 1, 1, 2, 2, 2)
    
    idx.all.dropAll(List(2, 5, 11)).lp // Prints: ~(1, 1, 1, 3, 3, 3, 4, 4, 4)

    Note. The operation is very efficient if streams are sorted

    Definition Classes
    _Class_filter
  20. def dropAllBy[B](f: Mapping[Double, B], a: ~[B])(implicit o: Ordering[B] = null): Stream[Double]

    Property group reversed filter

    Property group reversed filter

    Discards elements, which produce property value equal to the found in that stream

    ~~("abc", "d", "e", "", "fg", "hijk").dropAllBy(_.length, Seq(0, 3)).lp
    
    // Output
    ~(d, e, fg, hijk)
    Definition Classes
    _Class_filter
  21. def dropEverythingIf(b: Boolean): Stream[Double]

    Discarding everything

    Discarding everything

    With a single test lets to drop the entire pipeline in favor of void instance

    Note: This can also be done with 'if-else' outside the pipeline, however it proved to be useful with really long statements

    (1 to 10).all.dropEverythingIf(true).lp  // Prints ~()
    Definition Classes
    _Class_filter
  22. def dropLast(n: Int): Stream[Double]

    Sequence tail reversed filter

    Sequence tail reversed filter

    Discards the last consecutive number of elements

    (1 to 10).all.dropLast(3).lp // Prints ~(1, 2, 3, 4, 5, 6, 7)
    Definition Classes
    _Class_filter
  23. def dropNext(n: Int): Stream[Double]

    Sequence head reversed filter

    Sequence head reversed filter

    Discards the first consecutive number of elements

    (1 to 10).all.dropNext(3).lp // Prints ~(4, 5, 6, 7, 8, 9, 10)
    Definition Classes
    _Class_filter
  24. def dropRange(r: Range): ~[Double]

    Sequence range reversed filter

    Sequence range reversed filter

    Discards elements, which fall within the specified range

    (1 to 10).all.dropRange(3 to 7).lp  // Prints ~(1, 2, 3, 9, 10)
    Definition Classes
    _Class_filter
  25. def dropWhile(f: Filter[Double]): Stream[Double]

    Sequence head reversed filter

    Sequence head reversed filter

    Discards first consecutive elements satisfying the filter

    Note, everything starting from the first non compliant element will be allowed (including later compliant elements)

    def all = (1 to 5).all +~ (1 to 5)
    
    all.lp                     // Prints ~(1, 2, 3, 4, 5, 1, 2, 3, 4, 5)
    
    all.dropWhile(_ <= 3).lp   // Prints ~(4, 5, 1, 2, 3, 4, 5)
    Definition Classes
    _Class_filter
  26. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  28. def filter(f: Filter[Double]): Stream[Double]

    Same as let

    Same as let

    filter operation is left for compatibility

    let is the canonical filter

    Definition Classes
    _Class_filter
  29. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  30. def find(f: Filter[Double]): Double

    Find

    Find

    Returns the first element satisfying the given filter

    Fails if none found

    (1 to 1000).all.find(_ > 100)   // Returns 101
    Definition Classes
    _Class_evaluate_evaluate
  31. def findAnyOpt: Opt[Double]
    Attributes
    protected
    Definition Classes
    _evaluate_evaluate
  32. def findIdxOpt(f: Filter[Double]): Opt.Int

    Find index

    Find index

    Optionally returns index for the first element satisfying the filter or Opt.Void if none found

    (50 to 500).all.findIdxOpt(_ == 400)  // Retuns Opt(350)
    Definition Classes
    _Class_evaluate
  33. def findNextOpt(f: Filter[Double]): Opt[Double]

    Find next element

    Find next element

    Iterates elements until the first satisfying the filter is found

    Definition Classes
    _Class_Trait
  34. def findOpt(f: Filter[Double]): Opt[Double]

    Find

    Find

    Optionally returns the first element satisfying the given filter

    (1 to 1000).all.findOpt(_ > 100)   // Returns Opt(101)
    Definition Classes
    _Class_evaluate_evaluate
  35. def flatMap[B](f: Mapping[Double, ~[B]])(implicit i: Tag[B]): Stream[B]

    Map multiplier

    Map multiplier

    For every existing element, a mapped stream of elements is inserted into the pipeline

    Note. The mapping can return an empty stream, in which case total number of elements might even be reduced

    ~~(1, 2, 3).flatMap(i => Seq(i * 10, i * 100, i * 1000)).lp
    
    // Output
    ~(10, 100, 1000, 20, 200, 2000, 30, 300, 3000)
    f

    function to provide a stream of elements for each existing element

    Definition Classes
    _Class_map_map
  36. def flatten[B](implicit f: Mapping[Double, ~[B]], i: Tag[B]): Stream[B]

    Converts a stream of streams into a flat stream

    Converts a stream of streams into a flat stream

    val stream: ~[~[Char]] = ~~(
      'a' to 'd',
      List('x', 'y', 'z'),
      Vector('v', 'e', 'c', 't', 'o', 'r'))
    
    stream.flatten.lp // Prints: ~(a, b, c, d, x, y, z, v, e, c, t, o, r)
    Definition Classes
    _Class_map
  37. def fold(start: Double)(op: Folding[Double]): Double

    Basic fold

    Basic fold

    Folds elements with a binary function

    Returns start value for empty pipeline

    // Multiply every element by next
    
    (1 to 10).all.fold(1)(_ * _)   // Returns 3628800
    start

    seed value to start with

    Definition Classes
    _Class_aggregate_aggregate
  38. def foldAs[B](start: B)(op: Folding.As[B, Double])(implicit i: Tag[B]): B

    Fold and convert

    Fold and convert

    Folds and converts elements with a binary function

    // Calculate sum of first 1000 Ints
    
    (1 to 1000).all.foldAs[Long](0L)(_ + _) // Returns 500500
    start

    seed value to start with

    Definition Classes
    _Class_aggregate
  39. def foldFlowAs[B](start: B)(op: Folding.As[B, Double], cf: Folding[B] = null)(implicit arg0: Tag[B]): B

    foldAs

    foldAs

    For Stream this method is same as foldAs

    Only use it when dealing with Stream.Flow interface

    start

    seed value to start with

    cf

    collect function to put together results of parallel computations. It is not required and ignored for Stream

    Definition Classes
    _Class_aggregate_aggregate
  40. def foreach(c: Consumer[Double]): Unit

    Foreach override

    Foreach override

    foreach is the most widely used Stream method, which largely determines general performance

    Default implementation looks like

    def foreach(c: Stream.Consumer[A]) = while (prime) c.accept(pump)

    If custom Stream can do better, this method should be overridden

    Definition Classes
    _ClassDefaults_foreach
  41. def foreachIdx(f: Consumer.Idx[Double], start: Int = 0): Unit

    For each indexed

    For each indexed

    Calls foreach with counter

    ('A' to 'C').all.foreachIdx((i,v) => println("Element " + i + " = " + v), 1)
    
    // Output
    Element 1 = A
    Element 2 = B
    Element 3 = C
    start

    starting value for indexing

    Definition Classes
    _Class_foreach
  42. def format(s: Opt[String] = \/, pb: Opt[String] = \/, pa: Opt[String] = \/, c: Opt[(Double) ⇒ String] = \/): String

    Elements as String

    Elements as String

    All elements are converted toString

    The results are concatenated with possible use of padding and separator

    ('a' to 'j').all.format()              // Returns abcdefghij
    
    ('a' to 'j').all.format("|")           // Returns a|b|c|d|e|f|g|h|i|j
    
    ('a' to 'j').all.format(",", "[", "]") // Returns [a],[b],[c],[d],[e],[f],[g],[h],[i],[j]
    Definition Classes
    _Class_convert
  43. def group(test: (Double, Double) ⇒ Boolean, peekSplit: (Double, Boolean) ⇒ Any = (_, _) => ()): Stream[~[Double]]

    Group by test

    Group by test

    Puts elements in the same group based on a function test for every two consecutive elements

    // Putting Ints into groups of 3
    
    (0 to 20).all.group(_ / 3 == _ / 3).tp
    
    // Output
    ---------------
    ?
    ---------------
    ~(0, 1, 2)
    ~(3, 4, 5)
    ~(6, 7, 8)
    ~(9, 10, 11)
    ~(12, 13, 14)
    ~(15, 16, 17)
    ~(18, 19, 20)
    ---------------
    test

    function for two consecutive elements. if 'false' is returned, the second tested element will start a new group

    peekSplit

    function to run for each piped element. Boolean parameter indicates if the element starts a new group

    Definition Classes
    _Class_group
  44. def group: Stream[~[Double]]

    Simple grouping

    Simple grouping

    Puts consecutive elements in the same group if they are equal

    Note: Non consecutive equal elements will end up in different groups. Prior ordering might be needed

    def all =  ~~(1, 2, 3).flatMap(i => Seq(i, i, i))
    
    all.lp         // Prints ~(1, 1, 1, 2, 2, 2, 3, 3, 3)
    
    all.group.tp   // Prints  ------------
                              ?
                              ------------
                              ~(1, 1, 1)
                              ~(2, 2, 2)
                              ~(3, 3, 3)
                              ------------
    Definition Classes
    _Class_group
  45. def groupBy(properties: Mapping[Double, Any]*): Stream[~[Double]]

    Grouping on properties

    Grouping on properties

    Puts consecutive elements in the same group if all the specified properties are equal

    When properties change, a new group is started

     ('#' to '|').all.groupBy(_.isLetter, _.isDigit).tp
    
    // Output
    ---------------------------------------------------------------------------------
    ?
    ---------------------------------------------------------------------------------
    ~(#, $, %, &, ', (, ), *, +, ,, -, ., /)
    ~(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
    ~(:, ;, <, =, >, ?, @)
    ~(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)
    ~([, \, ], ^, _, `)
    ~(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z)
    ~({, |)
    ---------------------------------------------------------------------------------
    properties

    a set of functions, each indicating an element property

    Definition Classes
    _Class_group
  46. def groupBySize(size: Int): Stream[~[Double]]

    Fixed size groups

    Fixed size groups

    Puts consecutive elements into fixed size groups

    ('a' to 'z').all.groupBySize(8).tp
    
    // Output
    -------------------------
    ?
    -------------------------
    ~(a, b, c, d, e, f, g, h)
    ~(i, j, k, l, m, n, o, p)
    ~(q, r, s, t, u, v, w, x)
    ~(y, z)
    -------------------------
    size

    of groups. Cannot be less than 1.

    Definition Classes
    _Class_group
  47. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  48. def insert(index: Int, element: Double): Stream[Double]

    Insert at

    Insert at

    Creates a new Stream with given element inserted into this Stream at given index

    If index is out of range, the element is prepended or appended

    ('a' to 'd').all.insert(2, 'X').lp
    
     // Output
     ~(a, b, X, c, d)
    Definition Classes
    _Class_add
  49. def insertAll(index: Int, that: ~[Double]): Stream[Double]

    Insert stream at

    Insert stream at

    Creates a new Stream with that Stream inserted into this Stream at given index

    If index is out of range, the elements are prepended or appended

    Definition Classes
    _Class_add
    Example:
    1. ('a' to 'f').all.insertAll(3, 'X' to 'Z').lp
      
      // Output
      ~(a, b, c, X, Y, Z, d, e, f)
  50. def isAny(f: Filter[Double]): Boolean

    Any check

    Any check

    Returns true if there is an element satisfying the filter

    def all: ~[Int] = 1 to 100
    
    all.isAny(_ > 10)   // Returns true
    
    all.isAny(_ > 100)  // Returns false
    Definition Classes
    _Class_evaluate_evaluate
  51. def isEvery(f: Filter[Double]): Boolean

    Every check

    Every check

    Returns true if every element is satisfying the filter

    def all: ~[Int] = 1 to 100
    
    all.isEvery(_ > 10)    // Returns false
    
    all.isEvery(_ > 0)     // Returns true
    Definition Classes
    _Class_evaluate_evaluate
  52. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  53. def isParallel: Boolean

    Parallel check

    Parallel check

    Returns true if this Flow is parallel

    Definition Classes
    _Trait_Trait
  54. def last: Double

    Last element

    Last element

    Returns the last stream element

    Fails if empty

    Definition Classes
    _Class_evaluate
  55. def lastOpt: Opt[Double]

    Last element

    Last element

    Optionally returns the last element or Opt.Void

    Definition Classes
    _Class_evaluate
  56. def let(f: Filter[Double]): Stream[Double]

    Main filter

    Main filter

    Only lets elements satisfying the filter

    let is the main filtering method ('filter' is supported for compatibility only)

    (1 to 10).all.let(_ % 2 == 0).lp // Prints: ~(2, 4, 6, 8, 10)
    Definition Classes
    _Class_filter_filter
  57. def letAll(that: ~[Double])(implicit o: Ordering[Double] = null): Stream[Double]

    Group filter

    Group filter

    Only lets elements equal to the found in that stream

    val idx = (1 to 5).all.flatMap(i => Seq(i,i,i)).to[Idx]
    
    idx.all.lp                        // Prints: ~(1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5)
    
    idx.all.letAll(3 to 7).lp         // Prints: ~(3, 3, 3, 4, 4, 4, 5, 5, 5)
    
    idx.all.letAll(List(2, 5, 11)).lp // Prints: ~(2, 2, 2, 5, 5, 5)

    Note. The operation is very efficient if streams are sorted

    Definition Classes
    _Class_filter
  58. def letAllBy[B](f: Mapping[Double, B], that: ~[B])(implicit o: Ordering[B] = null): Stream[Double]

    Property group filter

    Property group filter

    Only lets elements, which produce property value equal to the found in that stream

    ~~("abc", "d", "e", "", "fg", "hijk").letAllBy(_.length, Seq(0, 1, 2)).lp
    
    // Output
    ~(d, e, , fg)
    Definition Classes
    _Class_filter
  59. def letIdx(f: Filter.Idx[Double], start: Int = 0): Stream[Double]

    Indexed filter

    Indexed filter

    Only lets elements satisfying the filter

    ('a' to 'z').all.letIdx((i, v) => i >= 2 && i <= 7, 1).lp
    
    // Output
    ~(b, c, d, e, f, g)
    start

    the starting indexing value

    Definition Classes
    _Class_filter
  60. def letLast(n: Int): Stream[Double]

    Sequence tail filter

    Sequence tail filter

    Only lets specified number of last elements

    (1 to 10).all.letLast(3).lp  // Prints  ~(8, 9, 10)
    Definition Classes
    _Class_filter
  61. def letMap[B](f: Mapping[Double, Opt[B]])(implicit i: Tag[B]): Stream[B]

    Filter and converter

    Filter and converter

    Only lets elements for which given function returns non empty Opt

    The elements are converted to the new type

    def all = "ABC" ~+ "1" + "22" + "D" + "333" + "E"
    
    all.letMap(v => if (v.length < 2) \/ else v).lp // Prints: ~(ABC, 22, 333)
    
    all.letMap({
      case s if (s.length >= 2) => s
      case _                    => \/
    }).lp                                           // Prints: ~(ABC, 22, 333)

    Note: letMap is often a faster alternative to collect with PartialFunction, because it is evaluated just once for each element

    Definition Classes
    _Class_map_filter → Shared
  62. def letNext(n: Int): Stream[Double]

    Sequence head filter

    Sequence head filter

    Only lets specified number of next elements

    Note: This might look like take, but it is more efficient (take immediately iterates the elements creating a new stream)

    (1 to 10).all.letNext(3).lp  // Prints  ~(1, 2, 3)
    Definition Classes
    _Class_filter
  63. def letRange(r: Range): ~[Double]

    Sequence range filter

    Sequence range filter

    Only lets elements within given index range

    ('a' to 'z').all.letRange(1 to 7).lp
    
    // Output
    ~(b, c, d, e, f, g, h)
    Definition Classes
    _Class_filter
  64. def letType[B](implicit t: ClassTag[B]): Stream[B]

    Filter and type converter

    Filter and type converter

    Only lets elements, which are instances of the given type

    Note, the result is mapped to the specified type

    def all = ~~[Any] + "1" + 2 + 3.0 + 4l + "5"
    
    all.lp                  // Prints ~(1, 2, 3.0, 4, 5)
    
    all.letType[String].lp  // Prints ~(1, 5)
    Definition Classes
    _Class_map_filter → Shared
  65. def letWhile(f: Filter[Double]): Stream[Double]

    Sequence head filter

    Sequence head filter

    Only lets first consecutive elements satisfying the filter

    Note, everything starting from the first non compliant element will be discarded (including later compliant elements)

    def all = (1 to 5).all +~ (1 to 5)
    
    all.lp                     // Prints ~(1, 2, 3, 4, 5, 1, 2, 3, 4, 5)
    
    all.letWhile(_ <= 3).lp    // Prints ~(1, 2, 3)
    Definition Classes
    _Class_filter
  66. def lp: Unit

    Line print

    Line print

    Is equivalent to:

    println(this)

    For example:

    (1 to 10).all.lp  // Prints ~(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
    Definition Classes
    _convert
  67. def map[B](f: Mapping[Double, B])(implicit i: Tag[B]): Stream[B]

    Element conversion

    Element conversion

    Converts every element in the pipeline with given function

    (1 to 5).all.map( _ / 2.0).lp  // Prints ~(0.5, 1.0, 1.5, 2.0, 2.5)
    Definition Classes
    _Class_map_map
  68. def mapCast[B]: Stream[B]

    Element cast

    Element cast

    Casts the pipeline elements into the type specified

    def all: ~[Any] = ~~[Any] + 1 + 2 + 3
    
    all.mapCast[Int].lp   // Prints: ~(1, 2, 3)

    Note. The cast will not fail immediately, and if there is a problem, it will come up later during pumping action

    Definition Classes
    _Class_map_map
  69. def mapIdx[B](f: Mapping.Idx[Double, B], start: Int = 0)(implicit arg0: Tag[B]): Stream[B]

    Indexed element conversion

    Indexed element conversion

    Converts every element in the pipeline with given function

    ('A' to 'G').all.mapIdx(_ + "=" + _, 1).lp  // Prints ~(1=A, 2=B, 3=C, 4=D, 5=E, 6=F, 7=G)
    f

    the conversion function which also accepts element index in the sequence

    start

    the starting value of indexing

    Definition Classes
    _Class_map
  70. def max(implicit c: Ordering[Double]): Double

    Largest

    Largest

    Selects maximum element, based on the Ordering

    Fails for empty stream

    ~~(4, 3, 12, 7).max // Returns 12
    Definition Classes
    _Class_aggregate
  71. def maxBy[B](f: Mapping[Double, B])(implicit arg0: Ordering[B]): Double

    Largest by property

    Largest by property

    Selects maximum element, based on mapping

    Fails for empty stream

    ~~("AA", "B", "CCCC", "DDD").maxBy(_.length) // Returns CCCC
    Definition Classes
    _Class_aggregate
  72. def maxByOpt[B](f: Mapping[Double, B])(implicit arg0: Ordering[B]): Opt[Double]

    Largest by property option

    Largest by property option

    Selects maximum element, based on mapping

    ~~("AA", "B", "CCCC", "DDD").maxByOpt(_.length).lp // Returns Opt(CCCC)
    Definition Classes
    _Class_aggregate_aggregate
  73. def maxOpt(implicit o: Ordering[Double]): Opt[Double]

    Largest

    Largest

    Selects maximum element, based on the Ordering

    ~~(4, 3, 12, 7).maxOpt // Returns Opt(12)
    Definition Classes
    _Class_aggregate_aggregate
  74. def min(implicit c: Ordering[Double]): Double

    Smallest

    Smallest

    Selects minimal element, based on the Ordering

    Fails for empty stream

    ~~(4, 3, 12, 7).min  // Returns 3
    Definition Classes
    _Class_aggregate
  75. def minBy[B](f: Mapping[Double, B])(implicit arg0: Ordering[B]): Double

    Smallest by property

    Smallest by property

    Selects minimal element, based on mapping

    Fails for empty stream

    ~~("AA", "B", "CCCC", "DDD").minBy(_.length) // Returns B
    Definition Classes
    _Class_aggregate
  76. def minByOpt[B](f: Mapping[Double, B])(implicit arg0: Ordering[B]): Opt[Double]

    Smallest by property option

    Smallest by property option

    Selects minimal element, based on mapping

    ~~("AA", "B", "CCCC", "DDD").minByOpt(_.length) // Returns Opt(B)
    Definition Classes
    _Class_aggregate_aggregate
  77. def minOpt(implicit o: Ordering[Double]): Opt[Double]

    Smallest

    Smallest

    Selects minimal element, based on the Ordering

    ~~(4, 3, 12, 7).minOpt  // Returns Opt(3)
    Definition Classes
    _Class_aggregate_aggregate
  78. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  79. def next: Double

    Next element

    Next element

    Delivers next element

    Fails if no elements

    Implemented as:

    def next: A = if (prime) pump else throw new IllegalStateException
    Definition Classes
    _Class_Trait
  80. def nextOpt: Opt[Double]

    Next element

    Next element

    Optionally returns next element or Opt.Void

    Definition Classes
    _Class_Trait
  81. def noindex: Stream[Double]

    Loose indexing optimizations

    Loose indexing optimizations

    Many streams from indexed sources (like IndexedSeq, Array, Vector, etc) are special. They know their size and can read elements without iteration. They can optimize operations like take, dropNext, letLast, and many others

    noindex turns this privileged Streams into regular and it is needed occasionally for debugging and testing

    Definition Classes
    _Class_flow
  82. def nosize: Stream[Double]

    Loose size information

    Loose size information

    Many streams return sizeOpt, knowing their current size

    nosize drops sizing information, so some optimizations will not be available

    This is primarily for testing and debgging

    Definition Classes
    _Class_flow
  83. final def notify(): Unit
    Definition Classes
    AnyRef
  84. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  85. def parallel: Stream.Flow[Double]

    Parallel

    Parallel

    Returns Stream.Flow with parallel execution

    Each consecutive element will be sent to a new thread for processing

    (1 to 5).all.parallel.map("Value: " + _ + "\t" + Thread.currentThread.getName).peek(println).drain
    
    // Output
    Value: 1    ForkJoinPool.commonPool-worker-9
    Value: 3    ForkJoinPool.commonPool-worker-11
    Value: 2    main
    Value: 4    ForkJoinPool.commonPool-worker-2
    Value: 5    ForkJoinPool.commonPool-worker-4
    Definition Classes
    _Class_flow
  86. def parallelIf(boolean: Boolean): Stream.Flow[Double]

    Conditionally parallel

    Conditionally parallel

    Switches to parallel execution if boolean parameter == true

    Returns Stream.Flow, which could be implemented as sequential Stream or parallel Stream.Flow

    (1 to 50).all.parallelIf(true).isParallel   // Returns true
    
    (1 to 50).all.parallelIf(false).isParallep  // Returns false
    Definition Classes
    _Class_flow
  87. def parallelIfOver(threshold: Int): Stream.Flow[Double]

    Conditionally parallel

    Conditionally parallel

    Switches to parallel execution if number of elements exceeds threshold

    Returns Stream.Flow, which could be implemented as sequential Stream or parallel Stream.Flow

    (1 to 50).all.parallelIfOver(100).isParallel   // Returns false
    
    (1 to 200).all.parallelIfOver(100).isParallel  // Returns true
    Definition Classes
    _Class_flow
  88. def partition(groupFilters: Filter[Double]*): Stream[~[Double]]

    Multi-filter grouping

    Multi-filter grouping

    All stream elements are grouped by specified filters

    Filters are applied in sequence, thus if an element is accepted into a group, it will not be evaluated by the rest of the filters

    If there are elements, which are left without a group, one extra group is created

    // Age groups
    (1 to 80).all.partition(_ <= 12, 13 to 19, _ < 30, 30 to 40, _ < 50, _ < 65).tp
    
    // Output
    -------------------------------------------------------------------
    ?
    -------------------------------------------------------------------
    ~(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
    ~(13, 14, 15, 16, 17, 18, 19)
    ~(20, 21, 22, 23, 24, 25, 26, 27, 28, 29)
    ~(30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40)
    ~(41, 42, 43, 44, 45, 46, 47, 48, 49)
    ~(50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64)
    ~(65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80)
    -------------------------------------------------------------------
    groupFilters

    a set of filters, to specify groups

    Definition Classes
    _Class_group
  89. def peek(f: Consumer[Double]): Stream[Double]

    Element access

    Element access

    Provides access to passing pipeline elements

    This method does not change pipeline type or composition in any way

    ('A' to 'C').all.peek(v => println("Passing: " + v)).count  // Returns 3
    
    // Output
    Passing: A
    Passing: B
    Passing: C
    Definition Classes
    _Class_peek_peek
  90. def peekIdx(f: Consumer.Idx[Double], start: Int = 0): Stream[Double]

    Indexed element access

    Indexed element access

    Provides access to passing pipeline elements with their index in sequence

    ('A' to 'C').all.peekIdx((i, v) => println("Peek " + i + " = " + v), 1).count // Returns 3
    
    // Output
    Peek 1 = A
    Peek 2 = B
    Peek 3 = C
    start

    starting value for element indexing

    Definition Classes
    _Class_peek_peek
  91. def preview: Stream[Double] with Stream.Interface.Preview[Double]

    Adds preview capabilities

    Adds preview capabilities

    Returns Interface.Preview, which allows to pre-load and inspect elements, even before they go through Stream

    Definition Classes
    _Class_flow
  92. abstract def prime: Boolean

    Get next element ready

    Get next element ready

    Prepares next element to be pumped. If required, the element might be requested from the source and saved locally

    Returns true if there is element waiting to be pumped or false if Stream is empty

    prime can be called multiple times without pumping the element, in this case it must consistently return the same value

    prime can be used similarly to Iterator.hasNext

    Definition Classes
    _Trait
  93. abstract def pump: Double

    Pump next element

    Pump next element

    NOTE: pump can only be called after prime which returned true. Not following this rule will cause unpredictable behavior

    pump is a faster next

    val s : ~[Int] = 1 to 7
    
    while(s.prime) print(s.pump)  // Prints 1234567
    Definition Classes
    _Trait
  94. def range(implicit c: Ordering[Double]): Range[Double]

    Element Range

    Element Range

    Selects min and max elements (according to the Ordering ), and returns result as Util.Range

    Note. Range is void for empty pipelines.

    (~~[Int] + 4 + 1 + 12 + 7).range  // Returns range from 1 to 12
    Definition Classes
    _Class_aggregate_aggregate
  95. def reduce(op: Folding[Double]): Double

    Reduces elements with a Folding functions

    Reduces elements with a Folding functions

    Will fail for empty Stream

    Definition Classes
    _Class_aggregate_aggregate
  96. def reduceOpt(op: Folding[Double]): Opt[Double]

    Reduces elements with a Folding functions

    Reduces elements with a Folding functions

    Returns Opt.Void for for empty Stream

    Definition Classes
    _Class_aggregate_aggregate
  97. def reverse: Stream[Double]

    Reverse order

    Reverse order

    Re-arranges elements is reverse order

    Note: this operation is not suitable for large streams

    Definition Classes
    _Class_flow
  98. def reverseSized(size: Int): Stream[Double]

    Reverse order in segments

    Reverse order in segments

    Reverses order of elements within segments of fixed size

    Use Case: Predefined Shuffle

    For testing it is often needed to get elements in random order. However it cannot be completely random, if we want to replicate the bug

    reverseSized can shuffle elements in a predefined order, given same group size

    (1 to 15).all.reverseSized(5).lp // Prints ~(5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 15, 14, 13, 12, 11)
    Definition Classes
    _Class_flow
  99. def sequential: Stream[Double]

    Restore Flow to Stream

    Restore Flow to Stream

    Restores potentially parallel Flow back to Stream

    If this is already a Stream, the operation is instant, returning this

    Otherwise the operation is quite expensive

    In many cases it is advisable to consume pipeline as Flow instead of converting to Stream

    val (count, millis) = (1 to 1000).all
      .parallel                           // Switching to parallel Stream.Flow
      .peek(_ => Thread.sleep(1))         // Expensive operation
      .sequential                         // Back to Stream
      .countAndMillis
    
    println("Count = " + count + ", done in " + millis / 1000F + " secs")
    
    // Output
    Count = 1000, done in 0.224 secs
    
    // Note: We have 1000 elements each pausing for 1 millis.
    //       Without parallel processing total time would be over 1 second
    Definition Classes
    _Class_flow_flow
  100. def shuffle: Stream[Double]

    Randomize order

    Randomize order

    Re-arranges elements is random order

    Note: this operation requires full buffering and is not suitable for large streams

    Definition Classes
    _Class_flow
  101. def sizeOpt: Opt.Int

    Current size option

    Current size option

    By default sizeOpt returns Opt.Void

    If custom Stream knows current size, this could greatly help optimizations

    Definition Classes
    Defaults
  102. def sliding(size: Int, step: Int = 1): Stream[~[Double]]

    Sliding group view

    Sliding group view

    Example: group size 3 with step 1

    ('a' to 'g').all.sliding(3).tp
    
    // Output
    ----------
    ?
    ----------
    ~(a, b, c)
    ~(b, c, d)
    ~(c, d, e)
    ~(d, e, f)
    ~(e, f, g)
    ----------

    Example: group size 4 with step 2

    ('a' to 'g').all.sliding(4,2).tp
    
    // Output
    -------------
    ?
    -------------
    ~(a, b, c, d)
    ~(c, d, e, f)
    ~(e, f, g)
    -------------
    Definition Classes
    _Class_group
  103. def sort(implicit c: Ordering[Double]): Stream[Double]

    Sort

    Sort

    Sorts stream elements with provided Ordering

    ~~(5, 1, 4, 2, 3).sort.lp  // Prints ~(1, 2, 3, 4, 5)
    Definition Classes
    _Class_order
  104. def sort(c: Comparator[Double]): ~[Double]
    Definition Classes
    _Class_order
  105. def sortBy[B, C, D](f1: Mapping[Double, B], f2: Mapping[Double, C], f3: Mapping[Double, D])(implicit arg0: Ordering[B], arg1: Ordering[C], arg2: Ordering[D]): Stream[Double]

    Sort by three properties

    Sort by three properties

    Sorts pipeline on first property, then if indeterminate on second, etc...

    Definition Classes
    _Class_order
  106. def sortBy[B, C](f1: Mapping[Double, B], f2: Mapping[Double, C])(implicit arg0: Ordering[B], arg1: Ordering[C]): Stream[Double]

    Sort by two properties

    Sort by two properties

    Sorts pipeline on first property, and then, if indeterminate on second

    Definition Classes
    _Class_order
  107. def sortBy[B](f: Mapping[Double, B])(implicit c: Ordering[B]): Stream[Double]

    Sort by property

    Sort by property

    Sorts pipeline on element's property, which is provided by given function

    ~~("aaaa", "bb", "ccc", "d").sortBy(_.length).lp
    
    // Output
    ~(d, bb, ccc, aaaa)
    Definition Classes
    _Class_order
  108. def sortedOpt: Opt[Comparator[Double]]

    Current sorted option

    Current sorted option

    By default sortedOpt returns Opt.Void

    If custom Stream is sorted, return the Ordering

    Definition Classes
    Defaults
  109. def sortReversed(implicit c: Ordering[Double]): Stream[Double]

    Sort reversed

    Sort reversed

    Reverse sorts stream elements with provided Ordering

    ~~(5, 1, 4, 2, 3).sort.lp  // Prints ~(5, 4, 3, 2, 1)
    Definition Classes
    _Class_order
  110. def sum(implicit n: Numeric[Double]): Double

    Sum

    Sum

    Computes sum value of all elements

    (0 to 1000).all.sum  // Returns: 500500
    Definition Classes
    _Class_aggregate_aggregate
  111. def sumFew[B](f: Mapping[Double, B]*)(implicit arg0: Numeric[B]): Seq[B] with Util.Able.Void

    Multi sum

    Multi sum

    Simultaneously computes multiple sum values for properties specified by several functions

    Returns Seq, with values corresponding to the given mappings

    For empty pipelines returned Seq will still hold zero numerics, but will test isVoid==true

    (1 to 1000).all.sumFew(v => v, _ * 10, _ * 100).all.lp  // Prints ~(500500, 5005000, 50050000)
    Definition Classes
    _Class_aggregate
  112. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  113. def take(cnt: Int): Stream[Double]

    Group iterate

    Group iterate

    Iterates through several elements at once and returns them as different Stream

    Note. letNext is somewhat similar and more efficient, because it is lazy

    val s : ~[Int] = 1 to 30
    
    s.take(5).lp  // Prints ~(1, 2, 3, 4, 5)
    
    s.take(12).lp // Prints ~(6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
    
    s.take(7).lp  // Prints ~(18, 19, 20, 21, 22, 23, 24)
    
    // Print leftovers
    s.lp          // Prints ~(25, 26, 27, 28, 29, 30)
    Definition Classes
    _Class_Trait
  114. def to[TRGT[_]](implicit c: Stream.Interface.To[TRGT]): TRGT[Double]

    Convert to type

    Convert to type

    Converts pipeline elements to the specified target type

    Available targets are defined in Stream.Interface.To$

    • Idx
    • Idx.Immutable
    • Idx.Buffer
    • Refs
    • scala.List
    • scala.Seq
    • scala.IndexedSeq
    • scala.Iterator
    • scala.Vector
    • scala.collection.mutable.Buffer
    • java.util.Collection
    • java.util.List
    • java.util.Iterator
    • java.util.Spliterator
    • java.util.stream.Stream
    ~~("1", "2", "3").to[Idx]       // Returns: Idx[String]
    
    ('A' to 'D').all.to[List]        // Returns: scala.List[Char]
    
    (1 to 5).all.to[java.util.List]  // Returns: java.util.List[Int]

    New target conversions can be implemented by creating implicit object extending Stream.Interface.To

    Definition Classes
    _Class_convert
  115. def toArray(implicit ct: ClassTag[Double]): Array[Double]

    Convert to Array

    Convert to Array

    Converts stream to array

    val a : Array[Int] =  (1 to 10).all.toArray
    Definition Classes
    _Class_convert
  116. def toInfo: Util.Info

    Metadata as String

    Metadata as String

    val info = ('a' to 'z').all.map(_.toUpper).toInfo
    
    println(info)  // Prints scalqa.Stream.Z.extend.map.map$rawRaw$9{type=Chars,size=26}
    Definition Classes
    _Trait
  117. def toInfoTree: Util.Info.Tree

    Metadata for all transformations

    Metadata for all transformations

    val tree = ('a' to 'z').all.let(_ > 'X').map(_.toUpper).toInfoTree
    
    println(tree)
    
    // Output
    scalqa.Stream.Z.extend.map.map$rawRaw$9{type=Chars}
      scalqa.Stream.Z.extend.filter.let$$anon$2{type=Chars}
        scalqa.Stream.Z.adapt.IndexedSeq$$anon$2{type=Chars,size=26,indexed}
    Definition Classes
    _Trait
  118. def toMemory: ~[Double]

    New buffered stream

    New buffered stream

    Loads all elements from source into memory and returns them as new Stream

    Definition Classes
    _Class_convert
  119. def toRaw[TRGT](implicit c: Stream.Interface.ToRaw[Double, TRGT]): TRGT

    Convert to immutable collection

    Convert to immutable collection

    Converts pipeline to the specified immutable collection

    The types of collection and Stream must match

    Available targets are:

    (1 to 10).all.toRaw[Ints]
    
    ('A' to 'D').all.toRaw[Chars]
    Definition Classes
    _Class_convert
  120. def toString(): String

    Elements as String

    Elements as String

    Returns String starting with ~( and containing all elements separated by comma

    (1 to 5).all.toString  //  Returns ~(1, 2, 3, 4, 5)
    Definition Classes
    _Class_convert → AnyRef → Any
  121. def toString(name: String): String

    Elements as String

    Elements as String

    Returns String starting with given name and containing all elements separated by ", "

    (1 to 5).all.toString("My Ints")  // Returns My Ints(1, 2, 3, 4, 5)
    Definition Classes
    _convert
  122. def toText: String

    Elements as multi-line String

    Elements as multi-line String

    Returns all elements as String formatted table

    If elements implement Util.Able.ToInfo, each 'info' property value is placed in a different column

    If elements implement scala.Product (like all Tuples), each Product element is placed in a different column

    ('a' to 'e').all.map(v => (v + "1", v + "2", v + "3", v + "4", v + "5")) tp
    
    // Output
    -- -- -- -- --
    ?  ?  ?  ?  ?
    -- -- -- -- --
    a1 a2 a3 a4 a5
    b1 b2 b3 b4 b5
    c1 c2 c3 c4 c5
    d1 d2 d3 d4 d5
    e1 e2 e3 e4 e5
    -- -- -- -- --
    Definition Classes
    _Class_convert
  123. def tp: Unit

    Text print

    Text print

    Is equivalent to:

    println(this.toText)

    For example:

    ('a' to 'd').all.zipIdx.tp
    
    // Output
    - -
    ? ?
    - -
    0 a
    1 b
    2 c
    3 d
    - -
    Definition Classes
    _convert
  124. def transpose[B](implicit f: Mapping[Double, ~[B]]): Stream[~[B]]

    Transpose

    Transpose

    Transposes matrix where rows become columns

    def all: ~[~[Int]] = ~~(11 to 15, List(21, 22, 23, 24, 25), Vector(31, 32, 33, 34, 35))
    
    all.tp
    
    all.transpose.tp
    
    // Output
    ---------------------
    ?
    ---------------------
    ~(11, 12, 13, 14, 15)
    ~(21, 22, 23, 24, 25)
    ~(31, 32, 33, 34, 35)
    ---------------------
    
    -------------
    ?
    -------------
    ~(11, 21, 31)
    ~(12, 22, 32)
    ~(13, 23, 33)
    ~(14, 24, 34)
    ~(15, 25, 35)
    -------------
    Definition Classes
    _Class_flow
  125. def triggerEmpty(f: ⇒ Unit): ~[Double]

    Run for empty

    Run for empty

    Runs given function if pipeline is empty

    Note: This method might not execute for some pumping methods, if they determine that pipeline is empty from metadata, and would not even attempt to pump elements. Please, test

    Definition Classes
    _Class_trigger
  126. def triggerEvery(s: Double, f: (Int, Double) ⇒ Unit): ~[Double]

    Run on timer

    Run on timer

    Runs given function every specified time period in fractional seconds, while elements are being pumped

    Note, it will not run even once if all elements pumped in less than the given seconds

    f

    function with cumulative element count and cumulative time in seconds as arguments

    Definition Classes
    _Class_trigger
  127. def triggerFirst(f: ⇒ Any): ~[Double]

    Runs before first

    Runs before first

    Runs given statement when the first element pumped, but before it is passed down the pipeline

    This will not run for empty pipeline

    Definition Classes
    _Class_trigger
  128. def triggerLast(f: (Int, Double) ⇒ Unit): ~[Double]

    Runs after last

    Runs after last

    Runs given function when pumping for the next element brings nothing

    This will not run for empty pipeline

    f

    Function with element count and time in seconds it took to pump all elements

    Definition Classes
    _Class_trigger
  129. def typeOpt: Opt[Util.Specialized.Type]

    Data type option

    Data type option

    By default typeOpt returns Opt.Void

    All customized bases (like Stream.A.Chars)) return appropriate type

    Definition Classes
    _ClassDefaults_Trait
  130. def unequalOpt(that: ~[Double], firstIndex: Int = 0, check: (Double, Double) ⇒ Boolean = _ == _): Opt[String]

    Unequal check

    Unequal check

    Pumps both streams and compares all corresponding elements

    When first not equal pair is found, message is returned

    If all elements are equal, Opt.Void is returned

    (0 to 10).all unequalOpt (0 to 10)         // Prints: Opt.Void
    
    (0 to 10).all unequalOpt (0 until 10)      // Prints: Opt(First has more elements)
    
    (0 to 5).all + 7 + 8 unequalOpt (0 to 10)  // Prints: Opt(Fail at index 6: 7 != 6)
    firstIndex

    - start of element indexing for error messages

    check

    is the function to compare two elements

    Definition Classes
    _Class_evaluate
  131. def unfold(f: Mapping[~[Double], Double]): Stream[Double]

    Lazy infinite stream

    Lazy infinite stream

    Lazily unfolds next value with a function taking all prior values

     // Unfoldifg Fibonacci Sequence
    
    (0 to 1).all.unfold(_.letLast(2).sum).letNext(20).lp
    
     // Output
     ~(0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181)
    Definition Classes
    _Class_Trait_flow_add
  132. def unzip[B, C](implicit f: (Double) ⇒ (B, C)): (Stream[B], Stream[C])

    Unzips stream in two

    Unzips stream in two

    val pairs = ('a' to 'g').all.zipMap(_.upper).to[Idx]
    
    pairs.all.lp  // Prints ~((a,A), (b,B), (c,C), (d,D), (e,E), (f,F), (g,G))
    
    val (left, right) = pairs.all.unzip
    
    left.all.lp   // Prints ~(a, b, c, d, e, f, g)
    
    right.all.lp  // Prints ~(G, F, E, D, C, B, A)
    Definition Classes
    _Class_zip
  133. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  134. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  135. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  136. def zip[B](that: ~[B]): Stream[(Double, B)]

    Zip that

    Zip that

    Merges this and that streams, creating Tuples for corresponding elements

    If that stream runs out of elements to merge, the rest of this stream will be discarded too

    (1 to 100).all.zip('A' to 'D').lp  // Prints ~((1,A), (2,B), (3,C), (4,D))
    Definition Classes
    _Class_zip
  137. def zipAll[B](that: ~[B], thisDflt: Opt[Double], thatDflt: Opt[B]): Stream[(Double, B)]

    Merge stream

    Merge stream

    Merges this and that streams, creating Tuples for corresponding elements

    ('a' to 'f').all.zip('A' to 'H', '?', '?').lp
    
    // Output
    ~((a,A), (b,B), (c,C), (d,D), (e,E), (f,F), (?,G), (?,H))
    that

    the stream to merge with this

    thisDflt

    if this Stream has fewer elements, thisDflt will be used to fill the voids. Fails if thisDflt is required, but not available

    thatDflt

    if that Stream has fewer elements, thatDflt will be used to fill the voids. Fails if thatDflt is required, but not available

    Definition Classes
    _Class_zip
  138. def zipFoldAs[B](start: B)(f: Folding.As[B, Double]): Stream[(Double, B)]

    Merges current folding value

    Merges current folding value

    (1 to 7).all.zipFoldAs(0L)(_ + _).tp
    
    // "Running Total" Output
    -- --
    ?  ?
    -- --
    1  1
    2  3
    3  6
    4  10
    5  15
    6  21
    7  28
    Definition Classes
    _Class_zip
  139. def zipIdx(start: Int): Stream[(Int, Double)]

    Merge index

    Merge index

    Creates a new Stream with elements paired with their sequential index

    Note: Idx is the first element in the resulting tuples.

    ('A' to 'F').all.zipIdx('A'.toInt) lp  // Prints ~((65,A), (66,B), (67,C), (68,D), (69,E), (70,F))
    start

    index initial value

    Definition Classes
    _Class_zip
  140. def zipIdx: Stream[(Int, Double)]

    Merge index

    Merge index

    Creates a new Stream with elements paired with their sequential index, starting at 0

    Note: Idx is the first element in the resulting tuples

    ('A' to 'F').all.zipIdx.lp // Prints ~((0,A), (1,B), (2,C), (3,D), (4,E), (5,F))
    Definition Classes
    _Class_zip
  141. def zipMap[B](f: Mapping[Double, B]): Stream[(Double, B)]

    Merge property

    Merge property

    Creates a new Stream with elements paired with their property, defined by given function

    ('A' to 'F').all.zipMap(_.toInt).lp  // Prints ~((A,65), (B,66), (C,67), (D,68), (E,69), (F,70))
    Definition Classes
    _Class_zip
  142. def zipNext: Stream[(Double, Opt[Double])]

    Merge with next

    Merge with next

    Creates new Stream with elements paired with the optional next element

    (1 to 5).all.zipNext.lp  // Prints ~((1,Opt(2)), (2,Opt(3)), (3,Opt(4)), (4,Opt(5)), (5,Opt.Void))
    Definition Classes
    _Class_zip
  143. def zipPrior: Stream[(Opt[Double], Double)]

    Merge with prior

    Merge with prior

    Creates new Stream with elements paired with the optional prior element

    (1 to 5).all.zipPrior.lp  // Prints ~((Opt.Void,1), (Opt(1),2), (Opt(2),3), (Opt(3),4), (Opt(4),5))
    Definition Classes
    _Class_zip

Operator

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(element: Double): Stream[Double]

    Append

    Append

    Same as append

    Creates a new Stream with given element appended to this Stream

    (1 to 5).all + 99 + 100 lp
    
    // Output
    ~(1, 2, 3, 4, 5, 99, 100)
    Definition Classes
    _Class_add
  4. def +~(that: ~[Double]): Stream[Double]

    Append all

    Append all

    Same as appendAll

    Creates a new Stream with that Stream appended to this Stream

    ('1' to '9').all +~ ('a' to 'd') +~ ('A' to 'D') lp
    
    // Output
    ~(1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, A, B, C, D)
    Definition Classes
    _Class_add
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any

Hidden

  1. def _consumeIndexed(f: Consumer[Double]): Unit
    Attributes
    protected
    Definition Classes
    _Class
  2. def _pumpIndexed: Double
    Attributes
    protected
    Definition Classes
    _Class