c
DenseMatrix()
rows: number,
cols: number
An f64 matrix resident in WASM memory. Storage is column-major:
view()[column * rows + row]. Fill the view directly to avoid a JS-to-WASM
input copy; use multiplyInto to reuse output storage across calculations.
- cols(): number
-
dispose(): void
Release WASM storage. Repeated disposal is harmless.
-
from(a: number[][]): DenseMatrix
Copy nested row-major input once into persistent column-major storage.
-
multiplyInto(): DenseMatrixrhs: DenseMatrix,out: DenseMatrix
Multiply without JS input/output copies, overwriting a distinct output.
- rows(): number
-
setData(): thisdata: Float64Array,layout?: "row-major" | "column-major"
Replace values from a typed buffer without allocating WASM storage.
-
toArray(): number[][]
Copy results out only when needed by the application.
-
view(): Float64Array
Borrow the current memory view; see the class lifetime contract.
Usage
import * as mod from "linalgebra/dense_matrix.ts";