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.
Reusable, row-equilibrated LU factorization of a finite square matrix. The default numerical singularity threshold is n * Number.EPSILON on pivots after each row is scaled by its largest absolute entry. It is not a condition number estimate. Pass an explicit nonnegative relative tolerance to override. Inputs and factorization state are never exposed or mutated by solve().
Matrix determinant.
Factor once and solve several right-hand sides without repeating elimination.
Computes the inverse of a square matrix.
Solve a linear system of equations Ax = b.
LU decomposition with partial pivoting.
Multiply nonempty numeric matrices. The JS backend avoids packing for small
products; the WASM backend borrows packed inputs. Inputs are not modified.
backend is an override, not a promise of a universal performance crossover.
Select a backend explicitly for reproducible measurements or automatically.
Usage
import * as linalgebra__Linear_algebra_operations___This_module_provides_utilities_for____Matrix_decomposition__LU_decomposition____Matrix_inversion__inv____Determinant_calculation__det____Linear_system_solving__linsolve_ from "linalgebra/index.ts";