Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package saddle

    Saddle is a Scala Data Library.

    Saddle

    Saddle is a Scala Data Library.

    Saddle provides array-backed, indexed one- and two-dimensional data structures.

    These data structures are specialized on JVM primitives. With them one can often avoid the overhead of boxing and unboxing.

    Basic operations also aim to be robust to missing values (NA's)

    The building blocks are intended to be easily composed.

    The foundational building blocks are:

    Inspiration for Saddle comes from many sources, including the R programming language, the pandas data analysis library for Python, and the Scala collections library.

    Definition Classes
    org
  • package vec

    Factory methods to generate Vec instances

    Factory methods to generate Vec instances

    Definition Classes
    saddle
  • VecDefault
c

org.saddle.vec

VecDefault

class VecDefault[T] extends NumericOps[Vec[T]] with Vec[T]

Self Type
VecDefault[T]
Linear Supertypes
Vec[T], NumericOps[Vec[T]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. VecDefault
  2. Vec
  3. NumericOps
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new VecDefault(values: Array[T], scalarTag: ST[T])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def %[B, That](other: B)(implicit op: BinOp[Mod, Vec[T], B, That]): That

    Integer modulus of division

    Integer modulus of division

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance (divisor)

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  4. def %=[B](other: B)(implicit op: BinOpInPlace[Mod, Vec[T], B]): Unit
    Definition Classes
    NumericOps
  5. def &[B, That](other: B)(implicit op: BinOp[BitAnd, Vec[T], B, That]): That

    Bit-wise AND

    Bit-wise AND

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  6. def &&[B, That](other: B)(implicit op: BinOp[AndOp, Vec[T], B, That]): That

    Logical AND

    Logical AND

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  7. def *[B, That](other: B)(implicit op: BinOp[Multiply, Vec[T], B, That]): That

    Multiplication

    Multiplication

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  8. def **[B, That](other: B)(implicit op: BinOp[Power, Vec[T], B, That]): That

    Exponentiation

    Exponentiation

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance (exponent)

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  9. def **=[B](other: B)(implicit op: BinOpInPlace[Power, Vec[T], B]): Unit
    Definition Classes
    NumericOps
  10. def *=[B](other: B)(implicit op: BinOpInPlace[Multiply, Vec[T], B]): Unit
    Definition Classes
    NumericOps
  11. def +[B, That](other: B)(implicit op: BinOp[Add, Vec[T], B, That]): That

    Addition

    Addition

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  12. def +=[B](other: B)(implicit op: BinOpInPlace[Add, Vec[T], B]): Unit
    Definition Classes
    NumericOps
  13. def -[B, That](other: B)(implicit op: BinOp[Subtract, Vec[T], B, That]): That

    Subtraction

    Subtraction

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  14. def -=[B](other: B)(implicit op: BinOpInPlace[Subtract, Vec[T], B]): Unit
    Definition Classes
    NumericOps
  15. def /[B, That](other: B)(implicit op: BinOp[Divide, Vec[T], B, That]): That

    Division

    Division

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance (divisor)

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  16. def /=[B](other: B)(implicit op: BinOpInPlace[Divide, Vec[T], B]): Unit
    Definition Classes
    NumericOps
  17. def <[B, That](other: B)(implicit op: BinOp[LtOp, Vec[T], B, That]): That

    Less-than comparison operator

    Less-than comparison operator

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  18. def <<[B, That](other: B)(implicit op: BinOp[BitShl, Vec[T], B, That]): That

    Bit-shift left

    Bit-shift left

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  19. def <=[B, That](other: B)(implicit op: BinOp[LteOp, Vec[T], B, That]): That

    Less-than-or-equal-to comparison operator

    Less-than-or-equal-to comparison operator

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  20. def <>[B, That](other: B)(implicit op: BinOp[NeqOp, Vec[T], B, That]): That

    Element-wise inequality operator

    Element-wise inequality operator

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  21. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  22. def =?[B, That](other: B)(implicit op: BinOp[EqOp, Vec[T], B, That]): That

    Element-wise equality operator

    Element-wise equality operator

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  23. def >[B, That](other: B)(implicit op: BinOp[GtOp, Vec[T], B, That]): That

    Greater-than comparison operator

    Greater-than comparison operator

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  24. def >=[B, That](other: B)(implicit op: BinOp[GteOp, Vec[T], B, That]): That

    Greater-than-or-equal-to comparison operator

    Greater-than-or-equal-to comparison operator

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  25. def >>[B, That](other: B)(implicit op: BinOp[BitShr, Vec[T], B, That]): That

    Bit-shift right (arithmetic)

    Bit-shift right (arithmetic)

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  26. def >>>[B, That](other: B)(implicit op: BinOp[BitUShr, Vec[T], B, That]): That

    Bit-shift right (logical)

    Bit-shift right (logical)

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  27. def ^[B, That](other: B)(implicit op: BinOp[BitXor, Vec[T], B, That]): That

    Bit-wise EXCLUSIVE OR

    Bit-wise EXCLUSIVE OR

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  28. def apply(loc: Int): T

    Same as raw

    Same as raw

    loc

    offset into Vec

    Definition Classes
    VecDefaultVec
  29. def argmax(implicit na: NUM[T], st: ST[T], ord: ORD[T]): Int

    Integer offset of the minimum element of the Vec, if one exists, or else -1

    Integer offset of the minimum element of the Vec, if one exists, or else -1

    Definition Classes
    VecDefaultVec
  30. def argmin(implicit na: NUM[T], st: ST[T], ord: ORD[T]): Int

    Integer offset of the minimum element of the Vec, if one exists, or else -1

    Integer offset of the minimum element of the Vec, if one exists, or else -1

    Definition Classes
    VecDefaultVec
  31. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  32. def at(loc: Int): Scalar[T]

    Access a boxed element of a Vec[A] at a single location

    Access a boxed element of a Vec[A] at a single location

    loc

    offset into Vec

    Definition Classes
    VecDefaultVec
  33. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  34. def concat(v: Vec[T]): Vec[T]

    Concatenate two Vec instances together, where there exists some way to join the type of elements.

    Concatenate two Vec instances together, where there exists some way to join the type of elements. For instance, Vec[Double] concat Vec[Int] will promote Int to Double as a result of the implicit existence of an instance of Promoter[Double, Int, Double]

    v

    Vec[B] to concat

    Definition Classes
    VecDefaultVec
  35. def contents: Array[T]

    Return copy of backing array

    Return copy of backing array

    Definition Classes
    VecDefaultVec
  36. def copy: Vec[T]

    Returns a Vec whose backing array has been copied

    Returns a Vec whose backing array has been copied

    Definition Classes
    VecDefaultVec
  37. def count: Int

    Counts the number of non-NA elements

    Counts the number of non-NA elements

    Definition Classes
    VecDefaultVec
  38. def countif(a: T): Int

    Counts the number of elements which equal a

  39. def countif(test: (T) => Boolean): Int

    Counts the number of non-NA elements satisfying the predicate

    Counts the number of non-NA elements satisfying the predicate

    Definition Classes
    VecDefaultVec
  40. def dot[B, That](other: B)(implicit op: BinOp[InnerProd, Vec[T], B, That]): That

    Dot (inner) product

    Dot (inner) product

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  41. def dropLeft(i: Int): Vec[T]

    Returns a Vec with the first i elements removed

    Returns a Vec with the first i elements removed

    Definition Classes
    VecDefaultVec
  42. def dropNA: Vec[T]

    Drop the elements of the Vec which are NA

    Drop the elements of the Vec which are NA

    Definition Classes
    VecDefaultVec
  43. def dropRight(i: Int): Vec[T]

    Returns a Vec with the last i elements removed

    Returns a Vec with the last i elements removed

    Definition Classes
    VecDefaultVec
  44. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  45. def equals(o: Any): Boolean

    Default equality does an iterative, element-wise equality check of all values.

    Default equality does an iterative, element-wise equality check of all values.

    Definition Classes
    VecDefault → AnyRef → Any
  46. def exists(pred: (T) => Boolean): Boolean

    Return true if there exists some element of the Vec which satisfies the predicate function

    Return true if there exists some element of the Vec which satisfies the predicate function

    pred

    Predicate function from A => Boolean

    Definition Classes
    VecDefaultVec
  47. def fillBackward(limit: Int): Vec[T]

    Fill NA values by propagating defined values backward.

    Fill NA values by propagating defined values backward.

    limit

    If > 0, propagate over a maximum of limit consecutive NA values

    Definition Classes
    VecDefaultVec
  48. def fillForward(limit: Int): Vec[T]

    Fill NA values by propagating defined values forward.

    Fill NA values by propagating defined values forward.

    limit

    If > 0, propagate over a maximum of limit consecutive NA values

    Definition Classes
    VecDefaultVec
  49. def fillNA(method: FillMethod, limit: Int = 0): Vec[T]

    Fill NAs by propagating existent values.

    Fill NAs by propagating existent values.

    limit

    If > 0, fill a maximum of limit consecutive NA values

    Definition Classes
    VecDefaultVec
  50. def fillNA(f: (Int) => T): Vec[T]

    Fills NA values in vector with result of a function which acts on the index of the particular NA value found

    Fills NA values in vector with result of a function which acts on the index of the particular NA value found

    f

    A function from Int => A; yields value for NA value at ith position

    Definition Classes
    VecDefaultVec
  51. def filter(pred: (T) => Boolean): Vec[T]

    Return Vec whose elements satisfy a predicate function

    Return Vec whose elements satisfy a predicate function

    pred

    Predicate function from A => Boolean

    Definition Classes
    VecDefaultVec
  52. def filterAt(pred: (Int) => Boolean): Vec[T]

    Return vec whose offets satisfy a predicate function

    Return vec whose offets satisfy a predicate function

    pred

    Predicate function from Int => Boolean

    Definition Classes
    VecDefaultVec
  53. def filterFoldLeft[B](pred: (T) => Boolean)(init: B)(f: (B, T) => B)(implicit arg0: ST[B]): B

    Filtered left fold over the elements of the Vec, as in scala collections library

    Filtered left fold over the elements of the Vec, as in scala collections library

    Definition Classes
    VecDefaultVec
  54. def filterScanLeft[B](pred: (T) => Boolean)(init: B)(f: (B, T) => B)(implicit arg0: ST[B]): Vec[B]

    Filtered left scan over elements of the Vec, as in scala collections library

    Filtered left scan over elements of the Vec, as in scala collections library

    Definition Classes
    VecDefaultVec
  55. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  56. def find(pred: (T) => Boolean): Vec[Int]

    Return Vec of integer locations (offsets) which satisfy some predicate

    Return Vec of integer locations (offsets) which satisfy some predicate

    pred

    Predicate function from A => Boolean

    Definition Classes
    VecDefaultVec
  57. def findOne(pred: (T) => Boolean): Int

    Return first integer location which satisfies some predicate, or -1 if there is none

    Return first integer location which satisfies some predicate, or -1 if there is none

    pred

    Predicate function from A => Boolean

    Definition Classes
    VecDefaultVec
  58. def first: Scalar[T]

    Access the first element of a Vec[A], or NA if length is zero

    Access the first element of a Vec[A], or NA if length is zero

    Definition Classes
    VecDefaultVec
  59. def flatMap[B](f: (T) => Vec[B])(implicit arg0: ST[B]): Vec[B]

    Maps a function over elements of the Vec and flattens the result.

    Maps a function over elements of the Vec and flattens the result.

    Definition Classes
    VecDefaultVec
  60. def foldLeft[B](init: B)(f: (B, T) => B)(implicit arg0: ST[B]): B

    Left fold over the elements of the Vec, as in scala collections library

    Left fold over the elements of the Vec, as in scala collections library

    Definition Classes
    VecDefaultVec
  61. def foldLeftWhile[B](init: B)(f: (B, T) => B)(cond: (B, T) => Boolean)(implicit arg0: ST[B]): B

    Left fold that folds only while the test condition holds true.

    Left fold that folds only while the test condition holds true. As soon as the condition function yields false, the fold returns.

    cond

    Function whose signature is the same as the fold function, except that it evaluates to Boolean

    Definition Classes
    VecDefaultVec
  62. def forall(pred: (T) => Boolean)(op: (T) => Unit): Unit

    Execute a (side-effecting) operation on each (non-NA) element in vec which satisfies some predicate.

    Execute a (side-effecting) operation on each (non-NA) element in vec which satisfies some predicate.

    pred

    Function A => Boolean

    op

    Side-effecting function

    Definition Classes
    VecDefaultVec
  63. def foreach(op: (T) => Unit): Unit

    Execute a (side-effecting) operation on each (non-NA) element in the vec

    Execute a (side-effecting) operation on each (non-NA) element in the vec

    op

    operation to execute

    Definition Classes
    VecDefaultVec
  64. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  65. def hasNA: Boolean

    Return true if there is an NA value in the Vec

    Return true if there is an NA value in the Vec

    Definition Classes
    VecDefaultVec
  66. def hashCode(): Int

    Default hashcode is simple rolling prime multiplication of sums of hashcodes for all values.

    Default hashcode is simple rolling prime multiplication of sums of hashcodes for all values.

    Definition Classes
    VecDefault → AnyRef → Any
  67. def head(n: Int): Vec[T]

    Return first n elements

    Return first n elements

    n

    Number of elements to access

    Definition Classes
    VecDefaultVec
  68. def isEmpty: Boolean

    True if and only if number of elements is zero

    True if and only if number of elements is zero

    Definition Classes
    VecDefaultVec
  69. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  70. def last: Scalar[T]

    Access the last element of a Vec[A], or NA if length is zero

    Access the last element of a Vec[A], or NA if length is zero

    Definition Classes
    VecDefaultVec
  71. def length: Int

    The number of elements in the container F

    The number of elements in the container F

    Definition Classes
    VecDefaultVec
  72. def map[B](f: (T) => B)(implicit arg0: ST[B]): Vec[B]

    Map a function over the elements of the Vec, as in scala collections library

    Map a function over the elements of the Vec, as in scala collections library

    Definition Classes
    VecDefaultVec
  73. def mask(f: (T) => Boolean): Vec[T]

    Returns Vec whose locations are NA where the result of the provided function evaluates to true

    Returns Vec whose locations are NA where the result of the provided function evaluates to true

    f

    A function taking an element and returning a Boolean

    Definition Classes
    VecDefaultVec
  74. def mask(m: Vec[Boolean]): Vec[T]

    Returns Vec whose locations corresponding to true entries in the boolean input mask vector are set to NA

    Returns Vec whose locations corresponding to true entries in the boolean input mask vector are set to NA

    m

    Mask vector of Vec[Boolean]

    Definition Classes
    VecDefaultVec
  75. def max(implicit na: NUM[T], st: ST[T]): Scalar[T]
    Definition Classes
    VecDefaultVec
  76. def mean(implicit n: NUM[T]): Double

    Return the mean of the values in the Vec, ignoring NA

    Return the mean of the values in the Vec, ignoring NA

    Definition Classes
    VecDefaultVec
  77. def median(implicit n: NUM[T]): Double

    Return the median of the values in the Vec, ignoring NA

    Return the median of the values in the Vec, ignoring NA

    Definition Classes
    VecDefaultVec
  78. def min(implicit na: NUM[T], st: ST[T]): Scalar[T]
    Definition Classes
    VecDefaultVec
  79. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  80. def needsCopy: Boolean

    Set to true when the vec is shifted over the backing array false iff the backing array is a contiguous sequence of the elements of this Vec false iff 0 until length map raw toArray structurally equals the backing array

    Set to true when the vec is shifted over the backing array false iff the backing array is a contiguous sequence of the elements of this Vec false iff 0 until length map raw toArray structurally equals the backing array

    Definition Classes
    VecDefaultVec
  81. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  82. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  83. def outer[B, That](other: B)(implicit op: BinOp[OuterProd, Vec[T], B, That]): That

    Outer product

    Outer product

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  84. def partition(pred: Vec[Boolean]): (Vec[T], Vec[T])

    Return Vec whose elements are selected via negating a Vec of booleans (where that Vec holds the value true)

    Return Vec whose elements are selected via negating a Vec of booleans (where that Vec holds the value true)

    pred

    Predicate vector: Vec[Boolean]

    Definition Classes
    VecDefaultVec
  85. def percentile(tile: Double, method: PctMethod = PctMethod.NIST)(implicit na: NUM[T]): Double

    Return the percentile of the values at a particular threshold, ignoring NA

    Return the percentile of the values at a particular threshold, ignoring NA

    tile

    The percentile in [0, 100] at which to compute the threshold

    method

    The percentile method; one of org.saddle.PctMethod percentile function: see: http://en.wikipedia.org/wiki/Percentile

    Definition Classes
    VecDefaultVec
  86. def print(len: Int = 10, stream: OutputStream = System.out): Unit

    Pretty-printer for Vec, which simply outputs the result of stringify.

    Pretty-printer for Vec, which simply outputs the result of stringify.

    len

    Number of elements to display

    Definition Classes
    VecDefaultVec
  87. def prod(implicit na: NUM[T], st: ST[T]): T

    Product of all the values in the Vec, ignoring NA values

    Product of all the values in the Vec, ignoring NA values

    Definition Classes
    VecDefaultVec
  88. def rank(tie: RankTie = RankTie.Avg, ascending: Boolean = true)(implicit na: NUM[T]): Vec[Double]

    Return a Vec of ranks corresponding to a Vec of numeric values.

    Return a Vec of ranks corresponding to a Vec of numeric values.

    tie

    Method with which to break ties; a org.saddle.RankTie

    ascending

    Boolean, default true, whether to give lower values larger rank

    Definition Classes
    VecDefaultVec
  89. def raw(loc: Int): T

    Access an unboxed element of a Vec[A] at a single location

    Access an unboxed element of a Vec[A] at a single location

    loc

    offset into Vec

    Definition Classes
    VecDefaultVec
  90. def reshape(rows: Int, columns: Int): Mat[T]

    Reshapes the Vec into a Mat

    Reshapes the Vec into a Mat

    May not copy. The new Mat instance may share data with this Vec.

    Definition Classes
    VecDefaultVec
  91. def reversed: Vec[T]

    Yield a Vec whose elements have been reversed from their original order

    Yield a Vec whose elements have been reversed from their original order

    Definition Classes
    VecDefaultVec
  92. def rolling[B](winSz: Int, f: (Vec[T]) => B)(implicit arg0: ST[B]): Vec[B]

    Produce a Vec whose entries are the result of executing a function on a sliding window of the data.

    Produce a Vec whose entries are the result of executing a function on a sliding window of the data.

    B

    Result type of function

    winSz

    Window size

    f

    Function Vec[A] => B to operate on sliding window

    Definition Classes
    VecDefaultVec
  93. def roundTo(sig: Int = 2)(implicit ev: NUM[T]): Vec[Double]

    Rounds elements in the vec (which must be numeric) to a significance level

    Rounds elements in the vec (which must be numeric) to a significance level

    sig

    Significance level to round to (e.g., 2 decimal places)

    Definition Classes
    VecDefaultVec
  94. val scalarTag: ST[T]

    A ScalarTag in the type of the elements of the Vec

    A ScalarTag in the type of the elements of the Vec

    Definition Classes
    VecDefaultVec
  95. def scanLeft[B](init: B)(f: (B, T) => B)(implicit arg0: ST[B]): Vec[B]

    Left scan over the elements of the Vec, as in scala collections library

    Left scan over the elements of the Vec, as in scala collections library

    Definition Classes
    VecDefaultVec
  96. def shift(n: Int): VecDefault[T]

    Creates a view into original Vec, but shifted so that n values at the beginning or end of the Vec are NA's.

    Creates a view into original Vec, but shifted so that n values at the beginning or end of the Vec are NA's. Data is not copied. ex. shift(1) : [1 2 3 4] => [NA 1 2 3] shift(-1) : [1 2 3 4] => [2 3 4 NA]

    n

    Number of offsets to shift

    Definition Classes
    VecDefaultVec
  97. def slice(from: Int, until: Int, stride: Int = 1): Vec[T]

    Creates a view into original vector from an offset up to, but excluding, another offset.

    Creates a view into original vector from an offset up to, but excluding, another offset. Data is not copied.

    from

    Beginning offset

    until

    One past ending offset

    stride

    Increment within slice

    Definition Classes
    VecDefaultVec
  98. def sliceBy(from: Int, to: Int, stride: Int = 1): Vec[T]

    Creates a view into original vector from an offset up to, and including, another offset.

    Creates a view into original vector from an offset up to, and including, another offset. Data is not copied.

    from

    Beginning offset

    to

    Ending offset

    stride

    Increment within slice

    Definition Classes
    VecDefaultVec
  99. def sorted(implicit ev: ORD[T], st: ST[T]): Vec[T]

    Yield a Vec whose elements have been sorted (in ascending order)

    Yield a Vec whose elements have been sorted (in ascending order)

    ev

    evidence of Ordering[A]

    Definition Classes
    VecDefaultVec
  100. def splitAt(i: Int): (Vec[T], Vec[T])

    Split Vec into two Vecs at position i

    Split Vec into two Vecs at position i

    i

    Position at which to split Vec

    Definition Classes
    VecDefaultVec
  101. def stringify(len: Int = 10): String

    Creates a string representation of Vec

    Creates a string representation of Vec

    len

    Max number of elements to include

    Definition Classes
    VecDefaultVec
  102. def sum(implicit na: NUM[T], st: ST[T]): T

    Sums up the elements of a numeric Vec

    Sums up the elements of a numeric Vec

    NOTE: scalac only specialized correctly if using the method in VecImpl referring to this.filterFoldLeft boxes

    Definition Classes
    VecDefaultVec
  103. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  104. def tail(n: Int): Vec[T]

    Return last n elements

    Return last n elements

    n

    Number of elements to access

    Definition Classes
    VecDefaultVec
  105. def take(rng: Slice[Int]): Vec[T]

    Slice a Vec at a bound of locations, e.g.

    Slice a Vec at a bound of locations, e.g.

    val v = Vec(1,2,3,4,5) v(1->3) == Vec(2,3,4)

    rng

    evaluates to IRange

    Definition Classes
    VecDefaultVec
  106. def take(locs: Int*): Vec[T]
    Definition Classes
    VecDefaultVec
  107. def take(locs: Array[Int]): Vec[T]

    Equivalent to slicing operation; e.g.

    Equivalent to slicing operation; e.g.

    val v = Vec(1,2,3)
    v.take(0,1) == v(0,1)
    locs

    Location of elements to take

    Definition Classes
    VecDefaultVec
  108. def takeLeft(i: Int): Vec[T]

    Returns a Vec with the first i elements

    Returns a Vec with the first i elements

    Definition Classes
    VecDefaultVec
  109. def takeRight(i: Int): Vec[T]

    Returns a Vec with the last i elements

    Returns a Vec with the last i elements

    Definition Classes
    VecDefaultVec
  110. def toArray: Array[T]

    Returns an array containing the elements of this Vec in contiguous order

    Returns an array containing the elements of this Vec in contiguous order

    May or may not return the backing array, therefore mutations to the returned array may or may not are visible to this Vec

    If needsCopy is false then it returns the backing array If needsCopy is true then the backing array is not contiguous

    Definition Classes
    VecDefaultVec
  111. def toSeq: IndexedSeq[T]

    Converts Vec to an indexed sequence (default implementation is immutable.Vector)

    Converts Vec to an indexed sequence (default implementation is immutable.Vector)

    Definition Classes
    VecDefaultVec
  112. def toString(): String
    Definition Classes
    VecDefault → AnyRef → Any
  113. def unary_-(implicit num: NUM[T]): Vec[T]

    Additive inverse of Vec with numeric elements

    Additive inverse of Vec with numeric elements

    Definition Classes
    VecDefaultVec
  114. def update(slice: Slice[Int], value: Vec[T]): Unit

    Updates (overwrites) a range in the Vec

    Updates (overwrites) a range in the Vec

    Mutates the underlying array

    Definition Classes
    VecDefaultVec
  115. def update(slice: Slice[Int], value: T): Unit

    Updates (overwrites) a range in the Vec

    Updates (overwrites) a range in the Vec

    Mutates the underlying array

    Definition Classes
    VecDefaultVec
  116. def update(offset: Int, value: T): Unit

    Updates (overwrites) a location in the Vec

    Updates (overwrites) a location in the Vec

    Mutates the underlying array

    Definition Classes
    VecDefaultVec
  117. def updated(offset: Array[Int], value: T): Vec[T]

    Returns a new Vec with the value at offset set to value

    Returns a new Vec with the value at offset set to value

    Copies before mutating. Ignores invalid offsets in the array

    Definition Classes
    VecDefaultVec
  118. def updated(offset: Int, value: T): Vec[T]

    Returns a new Vec with the value at offset set to value

    Returns a new Vec with the value at offset set to value

    Copies before mutating.

    Definition Classes
    VecDefaultVec
  119. def view(offsets: Array[Int]): Vec[T]

    Creates a view into original vector at arbitrary indexes.

    Creates a view into original vector at arbitrary indexes. Data is not copied.

    Definition Classes
    VecDefaultVec
  120. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  121. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  122. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  123. def where(pred: Vec[Boolean]): Vec[T]

    Return Vec whose elements are selected via a Vec of booleans (where that Vec holds the value true)

    Return Vec whose elements are selected via a Vec of booleans (where that Vec holds the value true)

    pred

    Predicate vector: Vec[Boolean]

    Definition Classes
    VecDefaultVec
  124. def whereNot(pred: Vec[Boolean]): Vec[T]

    Return Vec whose elements are selected via negating a Vec of booleans (where that Vec holds the value true)

    Return Vec whose elements are selected via negating a Vec of booleans (where that Vec holds the value true)

    pred

    Predicate vector: Vec[Boolean]

    Definition Classes
    VecDefaultVec
  125. def without(locs: Array[Int]): Vec[T]

    The complement of the take operation; slice out elements NOT specified in list.

    The complement of the take operation; slice out elements NOT specified in list.

    locs

    Location of elements not to take

    Definition Classes
    VecDefaultVec
  126. def xor[B, That](other: B)(implicit op: BinOp[XorOp, Vec[T], B, That]): That

    Logical EXCLUSIVE OR

    Logical EXCLUSIVE OR

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  127. def zipMap[B, C](other: Vec[B])(f: (T, B) => C)(implicit arg0: ST[B], arg1: ST[C]): Vec[C]

    Zips Vec with another Vec and applies a function to the paired elements.

    Zips Vec with another Vec and applies a function to the paired elements. If either of the pair is NA, the result is forced to NA.

    B

    Parameter of other Vec

    C

    Result of function

    other

    Vec[B]

    f

    Function (A, B) => C

    Definition Classes
    VecDefaultVec
  128. def zipMapIdx[C](f: (T, Int) => C)(implicit arg0: ST[C]): Vec[C]

    Zips Vec with another Vec and applies a function to the paired elements.

    Zips Vec with another Vec and applies a function to the paired elements. If either of the pair is NA, the result is forced to NA.

    C

    Result of function

    f

    Function (A, B) => C

    Definition Classes
    VecDefaultVec
  129. def |[B, That](other: B)(implicit op: BinOp[BitOr, Vec[T], B, That]): That

    Bit-wise OR

    Bit-wise OR

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps
  130. def ||[B, That](other: B)(implicit op: BinOp[OrOp, Vec[T], B, That]): That

    Logical OR

    Logical OR

    B

    type of the other operand

    That

    result type of operation

    other

    other operand instance

    op

    implicit evidence for operation between this and other

    Definition Classes
    NumericOps

Inherited from Vec[T]

Inherited from NumericOps[Vec[T]]

Inherited from AnyRef

Inherited from Any

Ungrouped