Media Encoder2027
Object

SparseMatrix

Algebra BLAS data class

Properties

NameType AccessDescription
Number readonly Get number of columns in this data object.
Number readonly Get number of rows in this data object.

Methods

→ SparseMatrix

Constructs a new BLAS Matrix object.

rows Number
cols 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 and column index.

rowIdx Number
colIdx Number
static → Object

Create a [vectors[0].length x vectors.length] matrix that contains the given vectors as columns. The vectors must all have the same length.

vectors Array
→ 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 SparseMatrix.