Matrix
determinant (M: Matrix): number
Calculates the determinant of a matrix M.
Name | Type | Default | Description |
---|---|---|---|
M | Matrix |
fill (value: number, x: number, y: number): Array<Array<number>>
Fills a matrix of size x, y with a given value.
Name | Type | Default | Description |
---|---|---|---|
value | number | ||
x | number | ||
y | number |
identity (n: number): Array<Array<number>>
Returns the identity matrix of size n.
Name | Type | Default | Description |
---|---|---|---|
n | number | 2 |
inverse (M: Matrix): Array<Array<number>>
Calculates the inverse of a matrix M.
Name | Type | Default | Description |
---|---|---|---|
M | Matrix |
product (matrices: Array<Matrix>): Matrix
Calculates the matrix product of multiple matrices.
Name | Type | Default | Description |
---|---|---|---|
matrices | Array<Matrix> |
scalarProduct (M: Matrix, v: number): Array<Array<number>>
Multiplies a matrix M by a scalar v.
Name | Type | Default | Description |
---|---|---|---|
M | Matrix | ||
v | number |
sum (matrices: Array<Matrix>): Matrix
Calculates the sum of two or more matrices.
Name | Type | Default | Description |
---|---|---|---|
matrices | Array<Matrix> |