Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SparseVec

Index

Constructors

constructor

  • new SparseVec(m: number, data?: number[]): SparseVec

Properties

data

data: number[]

m

m: number

Accessors

length

  • get length(): number

nnz

  • get nnz(): number

Methods

add

addN

at

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

    • m: number
    • safe: boolean = true

    Returns number

binop

binopN

copy

div

divN

dot

Protected ensureSize

mag

  • mag(): number

magSquared

  • magSquared(): number

mul

mulN

normalize

nzEntries

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

setAt

  • setAt(m: number, v: number, safe?: boolean): SparseVec

sub

subN

toDense

  • toDense(): any[]

Static fromDense

  • fromDense(dense: ArrayLike<number>): SparseVec

Generated using TypeDoc