Media Encoder2027
Object

Matrix

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

→ Matrix

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 linear (column-major) index of the maximum element.

→ Number

Get the value at the given row and column index.

rowIdx Number
colIdx Number
→ Object

Element-wise divide by another vector or matrix of the same shape; returns a new vector or matrix.

other Object
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
→ Number

Get the maximum element value in this vector or matrix.

→ Object

Element-wise maximum of each element and the given scalar; returns a new vector or matrix.

scalar Number
→ 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

Element-wise power; returns a new vector or matrix.

exponent Number
→ 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 Matrix.