class VecDefault[T] extends NumericOps[Vec[T]] with Vec[T]
- Self Type
- VecDefault[T]
- Alphabetic
- By Inheritance
- VecDefault
- Vec
- NumericOps
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- 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
- def %=[B](other: B)(implicit op: BinOpInPlace[Mod, Vec[T], B]): Unit
- Definition Classes
- NumericOps
- 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
- 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
- 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
- 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
- def **=[B](other: B)(implicit op: BinOpInPlace[Power, Vec[T], B]): Unit
- Definition Classes
- NumericOps
- def *=[B](other: B)(implicit op: BinOpInPlace[Multiply, Vec[T], B]): Unit
- Definition Classes
- NumericOps
- 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
- def +=[B](other: B)(implicit op: BinOpInPlace[Add, Vec[T], B]): Unit
- Definition Classes
- NumericOps
- 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
- def -=[B](other: B)(implicit op: BinOpInPlace[Subtract, Vec[T], B]): Unit
- Definition Classes
- NumericOps
- 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
- def /=[B](other: B)(implicit op: BinOpInPlace[Divide, Vec[T], B]): Unit
- Definition Classes
- NumericOps
- 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
- 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
- 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
- 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
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- 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
- 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
- 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
- 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
- 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
- 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
- def apply(loc: Int): T
Same as raw
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- 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
- VecDefault → Vec
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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
- VecDefault → Vec
- def contents: Array[T]
Return copy of backing array
Return copy of backing array
- Definition Classes
- VecDefault → Vec
- def copy: Vec[T]
Returns a Vec whose backing array has been copied
Returns a Vec whose backing array has been copied
- Definition Classes
- VecDefault → Vec
- def count: Int
Counts the number of non-NA elements
Counts the number of non-NA elements
- Definition Classes
- VecDefault → Vec
- def countif(a: T): Int
Counts the number of elements which equal
a
- 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
- VecDefault → Vec
- 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
- def dropLeft(i: Int): Vec[T]
Returns a Vec with the first
i
elements removedReturns a Vec with the first
i
elements removed- Definition Classes
- VecDefault → Vec
- def dropNA: Vec[T]
Drop the elements of the Vec which are NA
Drop the elements of the Vec which are NA
- Definition Classes
- VecDefault → Vec
- def dropRight(i: Int): Vec[T]
Returns a Vec with the last
i
elements removedReturns a Vec with the last
i
elements removed- Definition Classes
- VecDefault → Vec
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- 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
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- 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
- VecDefault → Vec
- 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
- def head(n: Int): Vec[T]
Return first n elements
- 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
- VecDefault → Vec
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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
- VecDefault → Vec
- def length: Int
The number of elements in the container F
The number of elements in the container F
- Definition Classes
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- def max(implicit na: NUM[T], st: ST[T]): Scalar[T]
- Definition Classes
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- def min(implicit na: NUM[T], st: ST[T]): Scalar[T]
- Definition Classes
- VecDefault → Vec
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- 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
- VecDefault → Vec
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- 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
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tail(n: Int): Vec[T]
Return last n elements
- 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
- VecDefault → Vec
- def take(locs: Int*): Vec[T]
- Definition Classes
- VecDefault → Vec
- 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
- VecDefault → Vec
- def takeLeft(i: Int): Vec[T]
Returns a Vec with the first
i
elementsReturns a Vec with the first
i
elements- Definition Classes
- VecDefault → Vec
- def takeRight(i: Int): Vec[T]
Returns a Vec with the last
i
elementsReturns a Vec with the last
i
elements- Definition Classes
- VecDefault → Vec
- 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 IfneedsCopy
is true then the backing array is not contiguous- Definition Classes
- VecDefault → Vec
- 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
- VecDefault → Vec
- def toString(): String
- Definition Classes
- VecDefault → AnyRef → Any
- def unary_-(implicit num: NUM[T]): Vec[T]
Additive inverse of Vec with numeric elements
Additive inverse of Vec with numeric elements
- Definition Classes
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- def updated(offset: Array[Int], value: T): Vec[T]
Returns a new Vec with the value at
offset
set tovalue
Returns a new Vec with the value at
offset
set tovalue
Copies before mutating. Ignores invalid offsets in the array
- Definition Classes
- VecDefault → Vec
- def updated(offset: Int, value: T): Vec[T]
Returns a new Vec with the value at
offset
set tovalue
Returns a new Vec with the value at
offset
set tovalue
Copies before mutating.
- Definition Classes
- VecDefault → Vec
- 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
- VecDefault → Vec
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- 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
- VecDefault → Vec
- 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
- VecDefault → Vec
- 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
- 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