Skip to content
Ubiquev1.0.4

Classes

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.

c
LUFactorization(
a: number[][],
relativeTolerance?: number
)

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().

Functions

f
det(x: matrix): number

Matrix determinant.

f
factorize(
a: number[][],
relativeTolerance?: number
): LUFactorization

Factor once and solve several right-hand sides without repeating elimination.

f
inv(x: number | matrix): number | matrix
2 overloads

Computes the inverse of a square matrix.

f
linsolve(
A: matrix,
b: array | matrix
): array | matrix

Solve a linear system of equations Ax = b.

f
matmul(
a: number[][],
b: number[][],
backend?: MatrixBackend
): number[][]

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.

Type Aliases

T
MatrixBackend = "auto" | "js" | "wasm"

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";