Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new CSR(m: number, n: number, data: number[], rows: number[], cols: number[]): CSR

Properties

cols

cols: number[]

Column indices for values in A

data

data: number[]

Non-zero matrix values

m

m: number

n

n: number

rows

rows: number[]

Row start indices into A

Methods

add

at

  • at(m: number, n: number, safe?: boolean): number

copy

denseCol

  • denseCol(n: number): number[]
  • Parameters

    • n: number

    Returns number[]

denseRow

  • denseRow(m: number): number[]
  • Parameters

    • m: number

    Returns number[]

Protected ensureSize

extract

  • extract(m: number, n: number, rows: number, cols: number): CSR
  • Parameters

    • m: number
    • n: number
    • rows: number
    • cols: number

    Returns CSR

mul

mulN

  • mulN(n: number): CSR

mulV

  • mulV(vec: number[]): any[]
  • Parameters

    • vec: number[]

    Returns any[]

nnz

  • nnz(): number

nnzCol

  • nnzCol(n: number): number

nnzRow

  • nnzRow(m: number): number

nzColRows

  • nzColRows(n: number): number[]

nzColVals

  • nzColVals(n: number): number[]

nzEntries

  • nzEntries(): Generator<NzEntry, void, unknown>

nzRowCols

  • nzRowCols(m: number): number[]

nzRowVals

  • nzRowVals(m: number): number[]

reshape

  • reshape(m: number, n?: number): CSR
  • Parameters

    • m: number
    • n: number = ...

    Returns CSR

setAt

  • setAt(m: number, n: number, x: number, safe?: boolean, compact?: boolean): CSR

sub

toDense

  • toDense(): number[]

toString

  • toString(): string

trace

  • trace(): number

transpose

  • transpose(): CSR

zero

Static diag

  • diag(vals: number[]): CSR

Static empty

  • empty(m: number, n?: number): CSR
  • Parameters

    • m: number
    • n: number = ...

    Returns CSR

Static fromDense

  • fromDense(m: number, n: number, dense: ArrayLike<number>): CSR
  • Constructs CSR from dense row-major matrix values.

    Parameters

    • m: number

      rows

    • n: number

      columns

    • dense: ArrayLike<number>

      matrix values

    Returns CSR

Static identity

  • identity(size: number): CSR

Generated using TypeDoc