Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Matrix

Hierarchy

  • Matrix

Index

Constructors

constructor

Properties

cols

cols: number

elements

elements: ReadonlyArray<ReadonlyArray<number>>

rows

rows: number

Methods

add

  • Parameters

    Returns Matrix

augment

backSubstitute

  • Parameters

    Returns Vector

canMultiplyFromLeft

  • canMultiplyFromLeft(matrix: MatrixLike): boolean
  • Parameters

    Returns boolean

col

  • Parameters

    • j: number

    Returns Vector

det

  • det(): number
  • Returns number

determinant

  • determinant(): number
  • Returns number

diagonal

  • Returns Vector

div

e

  • e(i: number, j: number): number | null
  • Parameters

    • i: number
    • j: number

    Returns number | null

elementMultiply

  • Parameters

    Returns Matrix

eql

  • eql(matrix: unknown, epsilon?: number): boolean
  • Parameters

    • matrix: unknown
    • Default value epsilon: number = Sylvester.approxPrecision

    Returns boolean

    True if the matrices are equal, false if they are not or a different size.

forwardSubstitute

  • Parameters

    Returns Vector

indexOf

  • indexOf(x: number): null | object
  • Parameters

    • x: number

    Returns null | object

inverse

  • Returns Matrix

isSameSizeAs

  • Parameters

    Returns boolean

isSingular

  • isSingular(): boolean
  • Returns boolean

isSquare

  • isSquare(): boolean
  • Returns boolean

log

  • Parameters

    • Default value base: number = Math.E

    Returns Matrix

lu

  • lu(): object

map

  • Parameters

    • fn: function
        • (value: number, row: number, column: number): number
        • Parameters

          • value: number
          • row: number
          • column: number

          Returns number

    Returns Matrix

max

  • max(): number
  • Returns number

maxColumnIndexes

  • Returns Vector

maxColumns

  • Returns Vector

mean

  • Returns Vector

minColumnIndexes

  • Returns Vector

minColumns

  • Returns Vector

minor

  • minor(startRow: number, startCol: number, nrows: number, ncols: number): Matrix
  • Parameters

    • startRow: number
    • startCol: number
    • nrows: number
    • ncols: number

    Returns Matrix

mulOp

  • Parameters

    • matrix: VectorOrList
    • op: function
        • (left: number, right: number): number
        • Parameters

          • left: number
          • right: number

          Returns number

    Returns Vector

  • Parameters

    • matrix: MatrixLike | number
    • op: function
        • (left: number, right: number): number
        • Parameters

          • left: number
          • right: number

          Returns number

    Returns Matrix

multiply

  • Parameters

    Returns Vector

  • Parameters

    Returns Matrix

pcaProject

  • pcaProject(k: number, U?: Matrix): object
  • Parameters

    • k: number
    • Default value U: Matrix = pca(this).U

    Returns object

pcaRecover

  • Parameters

    Returns Matrix

qr

  • qr(): object
  • Returns object

rank

  • rank(epsilon?: number): number
  • Parameters

    • Default value epsilon: number = Sylvester.precision

    Returns number

round

  • Returns Matrix

row

  • Parameters

    • i: number

    Returns Vector

slice

  • slice(startRow: number, endRow: number, startCol: number, endCol: number): Matrix
  • Parameters

    • startRow: number
    • endRow: number
    • startCol: number
    • endCol: number

    Returns Matrix

snapTo

  • snapTo(target: number, epsilon?: number): Matrix
  • Parameters

    • target: number
    • Default value epsilon: number = Sylvester.precision

    Returns Matrix

solve

  • Parameters

    Returns Vector

std

  • Returns Vector

subtract

  • Parameters

    Returns Matrix

sum

  • sum(): number
  • Returns number

svd

  • svd(): object

toArray

  • toArray(): number[][]
  • Returns number[][]

toRightTriangular

  • Returns Matrix

toString

  • toString(): string
  • Returns string

trace

  • trace(): number
  • Returns number

transpose

  • Returns Matrix

triu

  • Parameters

    • Default value k: number = 0

    Returns Matrix

unroll

  • Returns Vector

x

  • Parameters

    Returns Vector

  • Parameters

    Returns Matrix

Static Diagonal

Static Fill

  • Fill(n: number, m: number, value: number): Matrix
  • Parameters

    • n: number
    • m: number
    • value: number

    Returns Matrix

Static I

  • Parameters

    • size: number

    Returns Matrix

Static One

  • One(n: number, m: number): Matrix
  • Parameters

    • n: number
    • m: number

    Returns Matrix

Static Random

  • Random(n: number, m: number): Matrix
  • Parameters

    • n: number
    • m: number

    Returns Matrix

Static Rotation

  • Parameters

    • theta: number
    • Optional axis: Vector

    Returns Matrix

Static RotationX

  • RotationX(t: number): Matrix
  • Parameters

    • t: number

    Returns Matrix

Static RotationY

  • RotationY(t: number): Matrix
  • Parameters

    • t: number

    Returns Matrix

Static RotationZ

  • RotationZ(t: number): Matrix
  • Parameters

    • t: number

    Returns Matrix

Static Zero

  • Zero(n: number, m: number): Matrix
  • Parameters

    • n: number
    • m: number

    Returns Matrix

Generated using TypeDoc