Class Matrix

An NxM matrix.

Hierarchy

  • Matrix

Constructors

Properties

Accessors

Methods

Constructors

Properties

#values: number[][]
cols: number

The number of columns in the Matrix.

rows: number

The number of rows in the Matrix.

Accessors

  • get string(): string
  • Converts the Matrix to a string representation. Same as toString().

    Returns string

  • get values(): number[][]
  • Valies in the Matrix in the form values[row][col].

    Returns number[][]

  • set values(vals: number[][]): void
  • Parameters

    • vals: number[][]

    Returns void

Methods

  • Gets a value in the Matrix

    Parameters

    • row: number
    • col: number

    Returns null | number

  • Multiplies the Matrix with another Matrix. Returns null if the matrices cannot be multiplied.

    Matrices cannot be multiplied if the number of columns in the Matrix do not equal the number of rows in the Matrix being multiplied with.

    Parameters

    Returns null | Matrix

  • Sets a value in the Matrix.

    Parameters

    • row: number
    • col: number
    • val: number

    Returns Matrix

  • Converts the Matrix to a string representation. Same as the string property.

    Returns string

Generated using TypeDoc