Minimal dense linear algebra helpers (row-major nested arrays).
- Source:
Methods
(static) matMul(a, b) → {Array.<Array.<number>>}
Multiplies two matrices.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
Array.<Array.<number>> | m x k matrix. |
b |
Array.<Array.<number>> | k x n matrix. |
- Source:
Returns:
m x n matrix.
- Type
- Array.<Array.<number>>
(static) matVec(matrix, vector) → {Array.<number>}
Multiplies a matrix by a vector.
Parameters:
| Name | Type | Description |
|---|---|---|
matrix |
Array.<Array.<number>> | m x n matrix. |
vector |
Array.<number> | Vector of length n. |
- Source:
Returns:
Vector of length m.
- Type
- Array.<number>
(static) transpose(a) → {Array.<Array.<number>>}
Transposes a matrix.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
Array.<Array.<number>> |
- Source:
Returns:
- Type
- Array.<Array.<number>>