Expand description
Symbolic matrix type and operations. Symbolic matrix type.
Provides Matrix, a dense matrix of symbolic expressions with
exact arithmetic: construction, arithmetic operators, determinant
(Bareiss / Berkowitz), inverse, linear solving, characteristic
polynomial, eigenvalues/eigenvectors, diagonalization, Jordan form,
matrix exponential, LU/RREF, subspaces and code generation.
Additional decompositions (QR, LDLᵀ, Gram–Schmidt), structure tests
(is_symmetric, is_positive_definite, …) and norms live in
matrix_decomp but are all methods
on Matrix.
§API conventions
- Shape preconditions (non-square input, mismatched dimensions,
empty data) return
SymplexError::InvalidArgument. - Mathematical failure (singular matrix, not diagonalizable,
eigenvalue solver gave up, …) returns
SymplexError::ComputationFailed. - Indexing (
get,row,col,m[(i, j)],submatrix) panics on out-of-bounds indices, exactly like slice indexing; useMatrix::try_getfor a checked variant. - Sized constructors (
zeros,identity,from_fn) panic on a zero dimension — that is a programming error, not a data error. Data constructors (new,TryFrom<Vec<Vec<Ex>>>,from_i64) returnResult. - Structural queries (
is_symmetric,is_diagonalizable, …) are three-valuedOption<bool>:Nonemeans “cannot decide symbolically”. - The eigen-family (
eigenvals,eigenvects,diagonalize,jordan_form,matrix_exp) creates its own internal bound variable; the reserved name never appears in results. OnlyMatrix::char_polytakes a caller-supplied variable because the result is a polynomial in it.
Structs§
- Codegen
Options - Configuration for Rust code generation.
- Matrix
- A dense matrix of symbolic expressions.
Enums§
- Math
Backend - Math function dispatch strategy for generated code.
- Precision
- Floating-point precision for generated code.
Constants§
- EXPRESSION_
BUDGET - Upper bound on the total expression-tree size (nodes, counted without
sharing) of the operands and intermediate results of the symbolic
algorithms that can swell:
Matrix::det,Matrix::inv,Matrix::solve,Matrix::diagonalize,Matrix::jordan_form,Matrix::matrix_expandMatrix::qr.