Constructs a new BLAS Vector object.
Object
SparseVector
Algebra BLAS data class
Properties
| Name | Type | Access | Description |
|---|---|---|---|
| Number | readonly | Get number of columns in this data object. | |
| Number | readonly | Get the length of the vector. | |
| Number | readonly | Get number of rows in this data object. |
Methods
rows
Number
data
Varies
→ Object
Element-wise absolute value; returns a new vector or matrix.
→ Object
Element-wise add another vector or matrix of the same shape; returns a new vector or matrix.
other
Object
→ Number
Get the value at the given row index.
rowIdx
Number
→ Number
Compute the dot product of this vector with another.
other
Object
→ Object
Element-wise multiply by another vector or matrix of the same shape; returns a new vector or matrix.
other
Object
→ Number
Compute the norm of this vector or matrix.
→ Object
Multiply each element by the given scalar; returns a new vector or matrix.
factor
Number
→ Number
Compute the squared L2 norm of this vector or matrix.
→ Object
Element-wise subtract another vector or matrix of the same shape; returns a new vector or matrix.
other
Object
→ Number
Compute the sum of all elements in this vector or matrix.
Return 1
Methods that return a SparseVector.