Media Encoder2027
Object

SparseVector

Algebra BLAS data class

Properties

NameType AccessDescription
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

→ SparseVector

Constructs a new BLAS Vector object.

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.