object SparseVectorT extends Serializable
The SparseVectorT
object is the companion object for the SparseVectorT
class.
- Alphabetic
- By Inheritance
- SparseVectorT
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
type
RowMap = SortedLinkedHashMap[Int, TimeNum]
Shorthand type definition for sparse vector
Value Members
-
def
++(b: TimeNum, u: SparseVectorT): SparseVectorT
Concatenate scalar 'b' and vector 'u'.
Concatenate scalar 'b' and vector 'u'.
- b
the scalar to be concatenated - first part
- u
the vector to be concatenated - second part
-
def
apply(xs: Array[String], skip: Int): SparseVectorT
Create a
SparseVectorT
from an array ofString
s, skipping the first 'skip' elements.Create a
SparseVectorT
from an array ofString
s, skipping the first 'skip' elements. If an element is non-numeric, use its hashcode. FIX: Might be better to map non-numericString
s to ordinal values.- xs
the array of the
String
s- skip
the number of elements at the beginning to skip (e.g., id column)
-
def
apply(xs: Array[String]): SparseVectorT
Create a
SparseVectorT
from an array ofString
s.Create a
SparseVectorT
from an array ofString
s.- xs
the array of the
String
s
-
def
apply(x: String, xs: String*): SparseVectorT
Create a
SparseVectorT
from one or more values (repeated valuesString
*).Create a
SparseVectorT
from one or more values (repeated valuesString
*).- x
the first
String
- xs
the rest of the
String
s
-
def
apply(xs: Seq[TimeNum]): SparseVectorT
Create a
SparseVectorT
from a sequence ofTimeNum
s.Create a
SparseVectorT
from a sequence ofTimeNum
s.- xs
the sequence of the TimeNum numbers
-
def
apply(x: TimeNum, xs: TimeNum*): SparseVectorT
Create a
SparseVectorT
from one or more values (repeated valuesTimeNum
*).Create a
SparseVectorT
from one or more values (repeated valuesTimeNum
*).- x
the first
TimeNum
number- xs
the rest of the
TimeNum
numbers
-
def
range(start: Int, end: Int): SparseVectorT
Return a
SparseVectorT
containing a sequence of increasing integers in a range.Return a
SparseVectorT
containing a sequence of increasing integers in a range.- start
the start value of the vector, inclusive
- end
the end value of the vector, exclusive (i.e., the first value not returned)