Expand description
Matrix expression type with basic linear algebra operations.
This module provides a symbolic matrix type where elements are mathematical expressions, supporting operations like addition, multiplication, transpose, and trace with symbolic manipulation capabilities.
§Examples
use thales::matrix::MatrixExpr;
use thales::ast::Expression;
// Create a 2x2 identity matrix
let identity = MatrixExpr::identity(2);
// Create a matrix from expressions
let a = Expression::Integer(1);
let b = Expression::Integer(2);
let c = Expression::Integer(3);
let d = Expression::Integer(4);
let m = MatrixExpr::from_elements(vec![
vec![a, b],
vec![c, d],
]).unwrap();
// Transpose
let mt = m.transpose();Structs§
- Matrix
Expr - A matrix of symbolic expressions.
Enums§
- Bracket
Style - Bracket style for LaTeX output.
- Matrix
Error - Error type for matrix operations.
Type Aliases§
- Matrix
Result - Result type for matrix operations.