Skip to main content
Module

x/math/mod.ts>Matrix

Deno module for high-precision calculations and scientific computing
Latest
class Matrix
Re-export
import { Matrix } from "https://deno.land/x/math@v1.1.0/mod.ts";

Constructors

new
Matrix(matrix: IMatrix)

Properties

shape: Shape

Get the size of Matrix

Methods

private
generateNewShape(shape: Shape)
col(col: number): number[]

Get the value of a col

div(n: number | Matrix)

Divided the matrix by a number or matrix. similar like a / b

Plus matrix. similar like a - b

Plus matrix. similar like a + b

pointAt(row: number, col: number): number

Get a value of a point

Generate the new size of Matrix

row(row: number): number[]

Get the value of a row

times(n: number | Matrix)

Multiply the matrix by a number or matrix. similar like a * b

toString(): string

Print to human readable string

trace(k?: number): number

Get the trace of the Matrix

Transpose and return new Matrix