pub struct ExactMatrix<T: ExactScalar> { /* private fields */ }Expand description
Dense row-major matrix with exact numeric entries.
Use the aliases ZMatrix (BigInt entries) and QMatrix
(Ratio<BigInt> entries). Shapes are always non-empty
(nrows, ncols ≥ 1), like Matrix.
Element access follows Matrix: get / indexing panic on
out-of-range indices (a logic error, like slice indexing);
try_get returns Option. Shape-checked arithmetic
(add, sub, matmul) returns
Result; the operators + − * panic on a shape mismatch.
Implementations§
Source§impl<T: ExactScalar> ExactMatrix<T>
impl<T: ExactScalar> ExactMatrix<T>
Sourcepub fn new(rows: Vec<Vec<T>>) -> Result<Self, SymplexError>
pub fn new(rows: Vec<Vec<T>>) -> Result<Self, SymplexError>
Build from rows.
§Errors
SymplexError::InvalidArgument if there are no rows, a row is
empty, or the rows have different lengths.
§Examples
use symplex::matrix::ZMatrix;
use symplex::num_bigint::BigInt;
let m = ZMatrix::new(vec![vec![BigInt::from(1), BigInt::from(2)]]).unwrap();
assert_eq!(m.shape(), (1, 2));
assert!(ZMatrix::new(vec![vec![BigInt::from(1)], vec![]]).is_err());Sourcepub fn from_flat(
nrows: usize,
ncols: usize,
data: Vec<T>,
) -> Result<Self, SymplexError>
pub fn from_flat( nrows: usize, ncols: usize, data: Vec<T>, ) -> Result<Self, SymplexError>
Build from a flat row-major buffer of length nrows · ncols.
§Errors
SymplexError::InvalidArgument if a dimension is zero or the
buffer length does not match.
Sourcepub fn from_i64(rows: &[&[i64]]) -> Result<Self, SymplexError>
pub fn from_i64(rows: &[&[i64]]) -> Result<Self, SymplexError>
Build from machine-integer rows.
§Errors
SymplexError::InvalidArgument for empty or jagged input.
§Examples
use symplex::matrix::QMatrix;
use symplex::linprog::q;
let m = QMatrix::from_i64(&[&[1, 2], &[3, 4]]).unwrap();
assert_eq!(m[(1, 0)], q(3, 1));Sourcepub fn row_vector(entries: Vec<T>) -> Self
pub fn row_vector(entries: Vec<T>) -> Self
Sourcepub fn col_vector(entries: Vec<T>) -> Self
pub fn col_vector(entries: Vec<T>) -> Self
Sourcepub fn diagonal(&self) -> Vec<T>
pub fn diagonal(&self) -> Vec<T>
The diagonal entries (0,0), (1,1), … (length min(nrows, ncols)).
Sourcepub fn is_identity(&self) -> bool
pub fn is_identity(&self) -> bool
true if this is a square identity matrix.
Sourcepub fn submatrix(
&self,
rows: Range<usize>,
cols: Range<usize>,
) -> Result<Self, SymplexError>
pub fn submatrix( &self, rows: Range<usize>, cols: Range<usize>, ) -> Result<Self, SymplexError>
The sub-block with rows in rows and columns in cols.
§Errors
SymplexError::InvalidArgument if a range is empty or out of
bounds.
Sourcepub fn hstack(parts: &[&Self]) -> Result<Self, SymplexError>
pub fn hstack(parts: &[&Self]) -> Result<Self, SymplexError>
Horizontal concatenation [A | B | …].
§Errors
SymplexError::InvalidArgument if the list is empty or the row
counts differ.
Sourcepub fn vstack(parts: &[&Self]) -> Result<Self, SymplexError>
pub fn vstack(parts: &[&Self]) -> Result<Self, SymplexError>
Vertical concatenation.
§Errors
SymplexError::InvalidArgument if the list is empty or the column
counts differ.
Sourcepub fn map<U: ExactScalar>(&self, f: impl FnMut(&T) -> U) -> ExactMatrix<U>
pub fn map<U: ExactScalar>(&self, f: impl FnMut(&T) -> U) -> ExactMatrix<U>
Apply f to every entry.
Sourcepub fn add(&self, other: &Self) -> Result<Self, SymplexError>
pub fn add(&self, other: &Self) -> Result<Self, SymplexError>
Sourcepub fn sub(&self, other: &Self) -> Result<Self, SymplexError>
pub fn sub(&self, other: &Self) -> Result<Self, SymplexError>
Sourcepub fn matmul(&self, other: &Self) -> Result<Self, SymplexError>
pub fn matmul(&self, other: &Self) -> Result<Self, SymplexError>
Sourcepub fn trace(&self) -> Result<T, SymplexError>
pub fn trace(&self) -> Result<T, SymplexError>
Source§impl<T: ExactScalar> ExactMatrix<T>
impl<T: ExactScalar> ExactMatrix<T>
Sourcepub fn permanent(&self) -> Result<T, SymplexError>
pub fn permanent(&self) -> Result<T, SymplexError>
Permanent per(A) = Σ_σ ∏ᵢ a_{i,σ(i)} (the determinant without the
signs), by Ryser’s inclusion–exclusion formula walked in Gray-code
order: O(2ⁿ · n) ring operations and O(n) memory. SymPy:
Matrix.per().
The cost is exponential in n; matrices larger than 20×20 are
rejected rather than left to run for an unbounded time.
§Errors
SymplexError::InvalidArgumentif the matrix is not square.SymplexError::ComputationFailedifn > 20.
§Examples
use symplex::matrix::ZMatrix;
use symplex::num_bigint::BigInt;
let m = ZMatrix::from_i64(&[&[1, 2], &[3, 4]]).unwrap();
assert_eq!(m.permanent().unwrap(), BigInt::from(10)); // 1·4 + 2·3
let m3 = ZMatrix::from_i64(&[&[1, 2, 3], &[4, 5, 6], &[7, 8, 9]]).unwrap();
assert_eq!(m3.permanent().unwrap(), BigInt::from(450));Source§impl ExactMatrix<BigInt>
impl ExactMatrix<BigInt>
Sourcepub fn to_qmatrix(&self) -> QMatrix
pub fn to_qmatrix(&self) -> QMatrix
Convert to a QMatrix (every entry becomes n/1).
Sourcepub fn to_matrix(&self, ctx: &Context) -> Matrix
pub fn to_matrix(&self, ctx: &Context) -> Matrix
Convert to a symbolic Matrix of integer literals in ctx.
Sourcepub fn det(&self) -> Result<BigInt, SymplexError>
pub fn det(&self) -> Result<BigInt, SymplexError>
Determinant by Bareiss fraction-free elimination (O(n³) integer
operations, no fractions at any stage).
§Errors
SymplexError::InvalidArgument if the matrix is not square.
§Examples
use symplex::matrix::ZMatrix;
use symplex::num_bigint::BigInt;
let m = ZMatrix::from_i64(&[&[2, 1, 0], &[1, 3, 1], &[0, 1, 4]]).unwrap();
assert_eq!(m.det().unwrap(), BigInt::from(18));
assert!(ZMatrix::from_i64(&[&[1, 2, 3]]).unwrap().det().is_err());Sourcepub fn rank(&self) -> usize
pub fn rank(&self) -> usize
Rank over ℚ (equivalently over ℤ as a lattice).
§Examples
use symplex::matrix::ZMatrix;
assert_eq!(ZMatrix::from_i64(&[&[1, 2], &[2, 4]]).unwrap().rank(), 1);Sourcepub fn content(&self) -> BigInt
pub fn content(&self) -> BigInt
Greatest common divisor of all entries (0 for the zero matrix).
Sourcepub fn hermite_normal_form(&self) -> ZMatrix
pub fn hermite_normal_form(&self) -> ZMatrix
Row-style Hermite normal form H = U·A (U unimodular).
H is in row echelon form with positive pivots, every entry above a
pivot reduced into [0, pivot), zero rows at the bottom. This form
is unique. See normalforms for the
conventions in detail.
§Examples
use symplex::matrix::ZMatrix;
let a = ZMatrix::from_i64(&[&[1, 2], &[2, 4]]).unwrap();
assert_eq!(a.hermite_normal_form(), ZMatrix::from_i64(&[&[1, 2], &[0, 0]]).unwrap());Sourcepub fn hermite_normal_form_with_transform(&self) -> (ZMatrix, ZMatrix)
pub fn hermite_normal_form_with_transform(&self) -> (ZMatrix, ZMatrix)
Row-style Hermite normal form with its transform: (H, U),
H = U·A, det U = ±1.
Sourcepub fn column_hermite_normal_form(&self) -> ZMatrix
pub fn column_hermite_normal_form(&self) -> ZMatrix
Column-style Hermite normal form H = A·V (Cohen’s Algorithm 2.4.5,
SymPy’s convention): zero columns first, each pivot the lowest
nonzero entry of its column, pivots positive and strictly descending
from left to right, entries to the right of a pivot in [0, pivot).
§Examples
use symplex::matrix::ZMatrix;
let a = ZMatrix::from_i64(&[&[12, 6, 4], &[3, 9, 6], &[2, 16, 14]]).unwrap();
assert_eq!(
a.column_hermite_normal_form(),
ZMatrix::from_i64(&[&[10, 0, 2], &[0, 15, 3], &[0, 0, 2]]).unwrap()
);Sourcepub fn smith_normal_form(&self) -> ZMatrix
pub fn smith_normal_form(&self) -> ZMatrix
Smith normal form diag(d₁, …, dᵣ, 0, …) with dᵢ > 0, dᵢ | dᵢ₊₁.
§Examples
use symplex::matrix::ZMatrix;
let a = ZMatrix::from_i64(&[&[2, 0], &[0, 3]]).unwrap();
assert_eq!(a.smith_normal_form(), ZMatrix::from_i64(&[&[1, 0], &[0, 6]]).unwrap());Sourcepub fn smith_normal_form_with_transforms(&self) -> (ZMatrix, ZMatrix, ZMatrix)
pub fn smith_normal_form_with_transforms(&self) -> (ZMatrix, ZMatrix, ZMatrix)
Smith normal form with transforms (S, U, V), S = U·A·V,
det U = det V = ±1.
Sourcepub fn integer_nullspace(&self) -> Vec<ZMatrix> ⓘ
pub fn integer_nullspace(&self) -> Vec<ZMatrix> ⓘ
A ℤ-basis of the integer kernel {x ∈ ℤⁿ : A·x = 0}, as n × 1
column vectors (n − rank of them; empty for full column rank).
§Examples
use symplex::matrix::ZMatrix;
let a = ZMatrix::from_i64(&[&[2, 4, 6]]).unwrap();
let basis = a.integer_nullspace();
assert_eq!(basis.len(), 2);
for k in &basis {
assert!((&a * k).is_zero());
}Sourcepub fn is_unimodular(&self) -> bool
pub fn is_unimodular(&self) -> bool
Is this a square matrix with det = ±1 (invertible over ℤ)?
Non-square matrices give false.
Sourcepub fn lattice_determinant(&self) -> Result<BigInt, SymplexError>
pub fn lattice_determinant(&self) -> Result<BigInt, SymplexError>
Index [ℤᵐ : A·ℤⁿ] of the lattice spanned by the columns
(|det A| for a square nonsingular matrix).
§Errors
SymplexError::InvalidArgument if A does not have full row rank
(the index would be infinite).
Source§impl ExactMatrix<BigInt>
impl ExactMatrix<BigInt>
Sourcepub fn inv_mod(&self, m: &BigInt) -> Result<ZMatrix, SymplexError>
pub fn inv_mod(&self, m: &BigInt) -> Result<ZMatrix, SymplexError>
Inverse modulo m: the integer matrix B with entries in [0, m)
and A·B ≡ I (mod m), computed as adj(A) · det(A)⁻¹ mod m. SymPy:
Matrix.inv_mod(m).
§Errors
SymplexError::InvalidArgument if the matrix is not square, m < 2,
or gcd(det A, m) ≠ 1 (which includes every singular matrix).
§Examples
use symplex::matrix::ZMatrix;
use symplex::num_bigint::BigInt;
let a = ZMatrix::from_i64(&[&[1, 2], &[3, 4]]).unwrap();
let b = a.inv_mod(&BigInt::from(5)).unwrap();
assert_eq!(b, ZMatrix::from_i64(&[&[3, 1], &[4, 2]]).unwrap());
// det = −2 shares the factor 2 with the modulus 4.
assert!(a.inv_mod(&BigInt::from(4)).is_err());Sourcepub fn lll_default(&self) -> Result<ZMatrix, SymplexError>
pub fn lll_default(&self) -> Result<ZMatrix, SymplexError>
Sourcepub fn lll(&self, delta: (i64, i64)) -> Result<ZMatrix, SymplexError>
pub fn lll(&self, delta: (i64, i64)) -> Result<ZMatrix, SymplexError>
Lenstra–Lenstra–Lovász reduction of the lattice basis formed by the
rows, with Lovász parameter δ = num/den. SymPy:
Matrix.lll(delta).
The Gram–Schmidt data is kept as exact rationals, so the result is
exactly LLL-reduced: with μ_ij = ⟨b_i, b*_j⟩ / ⟨b*_j, b*_j⟩,
every |μ_ij| ≤ 1/2 (size condition) and
‖b*_k‖² ≥ (δ − μ²_{k,k−1}) ‖b*_{k−1}‖² (Lovász condition). The
reduced rows span the same lattice as the input (they differ by a
unimodular transform, see
lll_with_transform), and the first row
is within a factor 2^{(n−1)/2} of a shortest lattice vector. The
reduction order and rounding follow SymPy’s DomainMatrix.lll, so
the output coincides with SymPy’s for the same input.
§Errors
SymplexError::InvalidArgument if δ is not in the open interval
(1/4, 1), or the rows are linearly dependent (this includes having
more rows than columns).
§Examples
use symplex::matrix::ZMatrix;
let b = ZMatrix::from_i64(&[&[1, 1, 1], &[-1, 0, 2], &[3, 5, 6]]).unwrap();
let r = b.lll((3, 4)).unwrap();
assert_eq!(r, ZMatrix::from_i64(&[&[0, 1, 0], &[1, 0, 1], &[-1, 0, 2]]).unwrap());
// Same lattice: identical Hermite normal forms.
assert_eq!(r.hermite_normal_form(), b.hermite_normal_form());
assert!(b.lll((1, 4)).is_err());Sourcepub fn lll_with_transform(
&self,
delta: (i64, i64),
) -> Result<(ZMatrix, ZMatrix), SymplexError>
pub fn lll_with_transform( &self, delta: (i64, i64), ) -> Result<(ZMatrix, ZMatrix), SymplexError>
LLL reduction together with the unimodular transform: (R, T) with
R = T·A (det T = ±1). SymPy: Matrix.lll_transform(delta).
§Errors
Same as lll.
§Examples
use symplex::matrix::ZMatrix;
let b = ZMatrix::from_i64(&[&[1, 1, 1], &[-1, 0, 2], &[3, 5, 6]]).unwrap();
let (r, t) = b.lll_with_transform((3, 4)).unwrap();
assert_eq!(&t * &b, r);
assert!(t.is_unimodular());Source§impl ExactMatrix<Ratio<BigInt>>
impl ExactMatrix<Ratio<BigInt>>
Sourcepub fn to_zmatrix(&self) -> Option<ZMatrix>
pub fn to_zmatrix(&self) -> Option<ZMatrix>
Convert to a ZMatrix if every entry is an integer.
Sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
true if every entry is an integer.
Sourcepub fn to_matrix(&self, ctx: &Context) -> Matrix
pub fn to_matrix(&self, ctx: &Context) -> Matrix
Convert to a symbolic Matrix of rational literals in ctx.
Sourcepub fn clear_denominators(&self) -> (ZMatrix, BigInt)
pub fn clear_denominators(&self) -> (ZMatrix, BigInt)
Clear denominators: (Z, s) with Z = s · self integral and s
the least common multiple of all denominators.
§Examples
use symplex::matrix::{QMatrix, ZMatrix};
use symplex::linprog::q;
use symplex::num_bigint::BigInt;
let m = QMatrix::new(vec![vec![q(1, 2), q(1, 3)], vec![q(2, 1), q(-1, 6)]]).unwrap();
let (z, s) = m.clear_denominators();
assert_eq!(s, BigInt::from(6));
assert_eq!(z, ZMatrix::from_i64(&[&[3, 2], &[12, -1]]).unwrap());Sourcepub fn rref(&self) -> (QMatrix, Vec<usize>)
pub fn rref(&self) -> (QMatrix, Vec<usize>)
Reduced row-echelon form and the pivot columns.
Computed fraction-free (Bareiss Gauss–Jordan on the row-wise integerised matrix); the result is the unique RREF over ℚ.
§Examples
use symplex::matrix::QMatrix;
use symplex::linprog::q;
let a = QMatrix::from_i64(&[&[1, 2, 3], &[4, 5, 6], &[7, 8, 9]]).unwrap();
let (r, pivots) = a.rref();
assert_eq!(pivots, vec![0, 1]);
assert_eq!(r, QMatrix::from_i64(&[&[1, 0, -1], &[0, 1, 2], &[0, 0, 0]]).unwrap());
assert_eq!(QMatrix::from_i64(&[&[2, 4], &[1, 3]]).unwrap().rref().0[(0, 0)], q(1, 1));Sourcepub fn nullspace(&self) -> Vec<QMatrix> ⓘ
pub fn nullspace(&self) -> Vec<QMatrix> ⓘ
Basis of {x : A·x = 0} as n × 1 column vectors (empty for full
column rank). Each basis vector has a 1 in one free column and
zeros in the other free columns (the standard RREF construction).
§Examples
use symplex::matrix::QMatrix;
let a = QMatrix::from_i64(&[&[1, 2, 3], &[4, 5, 6]]).unwrap();
let ns = a.nullspace();
assert_eq!(ns.len(), 1);
assert!((&a * &ns[0]).is_zero());Sourcepub fn det(&self) -> Result<Q, SymplexError>
pub fn det(&self) -> Result<Q, SymplexError>
Determinant: the rows are scaled to integers, Bareiss’s fraction-free elimination runs over ℤ, and the row scales are divided back out.
§Errors
SymplexError::InvalidArgument if the matrix is not square.
§Examples
use symplex::matrix::QMatrix;
use symplex::linprog::q;
let m = QMatrix::new(vec![vec![q(1, 2), q(1, 3)], vec![q(1, 4), q(1, 5)]]).unwrap();
assert_eq!(m.det().unwrap(), q(1, 60));Sourcepub fn solve(&self, b: &QMatrix) -> Result<QMatrix, SymplexError>
pub fn solve(&self, b: &QMatrix) -> Result<QMatrix, SymplexError>
Solve A·X = B for square nonsingular A (B may have several
columns).
§Errors
SymplexError::InvalidArgumentifAis not square or the row counts differ.SymplexError::ComputationFailedifAis singular.
§Examples
use symplex::matrix::QMatrix;
use symplex::linprog::q;
let a = QMatrix::from_i64(&[&[2, 1], &[1, 3]]).unwrap();
let b = QMatrix::from_i64(&[&[1], &[1]]).unwrap();
assert_eq!(a.solve(&b).unwrap().col(0), vec![q(2, 5), q(1, 5)]);
assert!(QMatrix::from_i64(&[&[1, 2], &[2, 4]]).unwrap().solve(&b).is_err());Sourcepub fn inv(&self) -> Result<QMatrix, SymplexError>
pub fn inv(&self) -> Result<QMatrix, SymplexError>
Inverse.
§Errors
SymplexError::InvalidArgumentif not square.SymplexError::ComputationFailedif singular.
§Examples
use symplex::matrix::QMatrix;
let a = QMatrix::from_i64(&[&[2, 1], &[1, 1]]).unwrap();
let inv = a.inv().unwrap();
assert!((&a * &inv).is_identity());Sourcepub fn is_symmetric(&self) -> bool
pub fn is_symmetric(&self) -> bool
true if self equals its transpose.
Sourcepub fn ldl_psd(&self) -> Option<(QMatrix, Vec<Q>)>
pub fn ldl_psd(&self) -> Option<(QMatrix, Vec<Q>)>
Exact L·D·Lᵀ factorisation of a symmetric positive semidefinite
matrix: L unit lower triangular, D = diag(d) with every dₖ ≥ 0.
Returns None if the matrix is not square, not symmetric, or not
PSD — this is an exact PSD test. When a pivot dₖ is zero the
remaining entries of its column must vanish (as they do for a PSD
matrix), and L’s column is left zero.
§Examples
use symplex::matrix::QMatrix;
use symplex::linprog::{q, qi};
let a = QMatrix::from_i64(&[&[4, 2], &[2, 1]]).unwrap(); // rank 1, PSD
let (l, d) = a.ldl_psd().unwrap();
assert_eq!(d, vec![qi(4), qi(0)]);
assert_eq!(l[(1, 0)], q(1, 2));
assert!(QMatrix::from_i64(&[&[1, 2], &[2, 1]]).unwrap().ldl_psd().is_none()); // indefiniteSourcepub fn is_positive_semidefinite(&self) -> bool
pub fn is_positive_semidefinite(&self) -> bool
Exact positive-semidefiniteness test (symmetric and every
xᵀAx ≥ 0), via ldl_psd.
Sourcepub fn columnspace(&self) -> Vec<QMatrix> ⓘ
pub fn columnspace(&self) -> Vec<QMatrix> ⓘ
Basis of the column space: the pivot columns of self.
Source§impl ExactMatrix<Ratio<BigInt>>
impl ExactMatrix<Ratio<BigInt>>
Sourcepub fn rank_decomposition(&self) -> Result<(QMatrix, QMatrix), SymplexError>
pub fn rank_decomposition(&self) -> Result<(QMatrix, QMatrix), SymplexError>
Full-rank factorisation A = C·F: C (m × r) holds the pivot
columns of A, F (r × n) the nonzero rows of rref(A), where
r = rank A. SymPy: Matrix.rank_decomposition().
§Errors
SymplexError::ComputationFailed for the zero matrix (rank 0; the
factors would have an empty dimension).
§Examples
use symplex::matrix::QMatrix;
let a = QMatrix::from_i64(&[&[1, 2, 3], &[4, 5, 6], &[7, 8, 9]]).unwrap();
let (c, f) = a.rank_decomposition().unwrap();
assert_eq!(c, QMatrix::from_i64(&[&[1, 2], &[4, 5], &[7, 8]]).unwrap());
assert_eq!(f, QMatrix::from_i64(&[&[1, 0, -1], &[0, 1, 2]]).unwrap());
assert_eq!(&c * &f, a);Sourcepub fn pinv(&self) -> Result<QMatrix, SymplexError>
pub fn pinv(&self) -> Result<QMatrix, SymplexError>
Moore–Penrose pseudo-inverse A⁺ (n × m), exact for any rank.
SymPy: Matrix.pinv().
Uses the full-rank factorisation A = C·F of
rank_decomposition:
A⁺ = Fᵀ (F Fᵀ)⁻¹ (Cᵀ C)⁻¹ Cᵀ. The zero matrix maps to the zero
n × m matrix.
§Errors
SymplexError::ComputationFailed only if an internal invariant is
violated (CᵀC and FFᵀ are invertible by construction).
§Examples
use symplex::matrix::QMatrix;
use symplex::linprog::q;
let a = QMatrix::from_i64(&[&[1, 2], &[2, 4]]).unwrap(); // rank 1
let p = a.pinv().unwrap();
assert_eq!(p[(0, 0)], q(1, 25));
assert_eq!(p[(1, 1)], q(4, 25));
assert_eq!(&(&a * &p) * &a, a); // A A⁺ A = ASourcepub fn hessenberg(&self) -> Result<(QMatrix, QMatrix), SymplexError>
pub fn hessenberg(&self) -> Result<(QMatrix, QMatrix), SymplexError>
Upper Hessenberg form by Gaussian similarity transforms: (H, P)
with H = P⁻¹ A P and h_ij = 0 for i > j + 1. SymPy:
Matrix.upper_hessenberg_decomposition() (which uses Householder
reflections and therefore radicals; this variant stays in ℚ).
Column k is cleared below the sub-diagonal with the first nonzero
candidate as pivot (a symmetric row/column swap when it is not
already in row k + 1), followed by the row operations
row_j −= f·row_{k+1} and the compensating column operations
col_{k+1} += f·col_j.
§Errors
SymplexError::InvalidArgument if the matrix is not square.
§Examples
use symplex::matrix::QMatrix;
use symplex::linprog::q;
let a = QMatrix::from_i64(&[&[1, 2, 3], &[4, 5, 6], &[7, 8, 10]]).unwrap();
let (h, p) = a.hessenberg().unwrap();
assert_eq!(h[(2, 0)], q(0, 1));
assert_eq!(&a * &p, &p * &h); // A P = P H
assert_eq!(p.inv().unwrap() * &a * &p, h);Trait Implementations§
Source§impl<T: ExactScalar> Add for ExactMatrix<T>
impl<T: ExactScalar> Add for ExactMatrix<T>
Source§type Output = ExactMatrix<T>
type Output = ExactMatrix<T>
+ operator.Source§fn add(self, rhs: ExactMatrix<T>) -> ExactMatrix<T>
fn add(self, rhs: ExactMatrix<T>) -> ExactMatrix<T>
+ operation. Read moreSource§impl<T: ExactScalar> Add<&ExactMatrix<T>> for &ExactMatrix<T>
impl<T: ExactScalar> Add<&ExactMatrix<T>> for &ExactMatrix<T>
Source§type Output = ExactMatrix<T>
type Output = ExactMatrix<T>
+ operator.Source§fn add(self, rhs: &ExactMatrix<T>) -> ExactMatrix<T>
fn add(self, rhs: &ExactMatrix<T>) -> ExactMatrix<T>
+ operation. Read moreSource§impl<T: ExactScalar> Add<&ExactMatrix<T>> for ExactMatrix<T>
impl<T: ExactScalar> Add<&ExactMatrix<T>> for ExactMatrix<T>
Source§type Output = ExactMatrix<T>
type Output = ExactMatrix<T>
+ operator.Source§fn add(self, rhs: &ExactMatrix<T>) -> ExactMatrix<T>
fn add(self, rhs: &ExactMatrix<T>) -> ExactMatrix<T>
+ operation. Read moreSource§impl<T: ExactScalar> Add<ExactMatrix<T>> for &ExactMatrix<T>
impl<T: ExactScalar> Add<ExactMatrix<T>> for &ExactMatrix<T>
Source§type Output = ExactMatrix<T>
type Output = ExactMatrix<T>
+ operator.Source§fn add(self, rhs: ExactMatrix<T>) -> ExactMatrix<T>
fn add(self, rhs: ExactMatrix<T>) -> ExactMatrix<T>
+ operation. Read moreSource§impl<T: Clone + ExactScalar> Clone for ExactMatrix<T>
impl<T: Clone + ExactScalar> Clone for ExactMatrix<T>
Source§fn clone(&self) -> ExactMatrix<T>
fn clone(&self) -> ExactMatrix<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T: ExactScalar> Debug for ExactMatrix<T>
impl<T: ExactScalar> Debug for ExactMatrix<T>
Source§impl<T: ExactScalar> Display for ExactMatrix<T>
impl<T: ExactScalar> Display for ExactMatrix<T>
impl<T: Eq + ExactScalar> Eq for ExactMatrix<T>
Source§impl<T: Hash + ExactScalar> Hash for ExactMatrix<T>
impl<T: Hash + ExactScalar> Hash for ExactMatrix<T>
Source§impl<T: ExactScalar> Index<(usize, usize)> for ExactMatrix<T>
impl<T: ExactScalar> Index<(usize, usize)> for ExactMatrix<T>
Source§impl<T: ExactScalar> IndexMut<(usize, usize)> for ExactMatrix<T>
impl<T: ExactScalar> IndexMut<(usize, usize)> for ExactMatrix<T>
Source§impl<T: ExactScalar> Mul for ExactMatrix<T>
impl<T: ExactScalar> Mul for ExactMatrix<T>
Source§type Output = ExactMatrix<T>
type Output = ExactMatrix<T>
* operator.Source§fn mul(self, rhs: ExactMatrix<T>) -> ExactMatrix<T>
fn mul(self, rhs: ExactMatrix<T>) -> ExactMatrix<T>
* operation. Read moreSource§impl<T: ExactScalar> Mul<&ExactMatrix<T>> for &ExactMatrix<T>
impl<T: ExactScalar> Mul<&ExactMatrix<T>> for &ExactMatrix<T>
Source§type Output = ExactMatrix<T>
type Output = ExactMatrix<T>
* operator.Source§fn mul(self, rhs: &ExactMatrix<T>) -> ExactMatrix<T>
fn mul(self, rhs: &ExactMatrix<T>) -> ExactMatrix<T>
* operation. Read moreSource§impl<T: ExactScalar> Mul<&ExactMatrix<T>> for ExactMatrix<T>
impl<T: ExactScalar> Mul<&ExactMatrix<T>> for ExactMatrix<T>
Source§type Output = ExactMatrix<T>
type Output = ExactMatrix<T>
* operator.Source§fn mul(self, rhs: &ExactMatrix<T>) -> ExactMatrix<T>
fn mul(self, rhs: &ExactMatrix<T>) -> ExactMatrix<T>
* operation. Read moreSource§impl<T: ExactScalar> Mul<&T> for &ExactMatrix<T>
impl<T: ExactScalar> Mul<&T> for &ExactMatrix<T>
Source§type Output = ExactMatrix<T>
type Output = ExactMatrix<T>
* operator.Source§impl<T: ExactScalar> Mul<ExactMatrix<T>> for &ExactMatrix<T>
impl<T: ExactScalar> Mul<ExactMatrix<T>> for &ExactMatrix<T>
Source§type Output = ExactMatrix<T>
type Output = ExactMatrix<T>
* operator.Source§fn mul(self, rhs: ExactMatrix<T>) -> ExactMatrix<T>
fn mul(self, rhs: ExactMatrix<T>) -> ExactMatrix<T>
* operation. Read moreSource§impl<T: ExactScalar> Neg for &ExactMatrix<T>
impl<T: ExactScalar> Neg for &ExactMatrix<T>
Source§type Output = ExactMatrix<T>
type Output = ExactMatrix<T>
- operator.Source§fn neg(self) -> ExactMatrix<T>
fn neg(self) -> ExactMatrix<T>
- operation. Read moreSource§impl<T: ExactScalar> Neg for ExactMatrix<T>
impl<T: ExactScalar> Neg for ExactMatrix<T>
Source§type Output = ExactMatrix<T>
type Output = ExactMatrix<T>
- operator.Source§fn neg(self) -> ExactMatrix<T>
fn neg(self) -> ExactMatrix<T>
- operation. Read moreSource§impl<T: PartialEq + ExactScalar> PartialEq for ExactMatrix<T>
impl<T: PartialEq + ExactScalar> PartialEq for ExactMatrix<T>
impl<T: PartialEq + ExactScalar> StructuralPartialEq for ExactMatrix<T>
Source§impl<T: ExactScalar> Sub for ExactMatrix<T>
impl<T: ExactScalar> Sub for ExactMatrix<T>
Source§type Output = ExactMatrix<T>
type Output = ExactMatrix<T>
- operator.Source§fn sub(self, rhs: ExactMatrix<T>) -> ExactMatrix<T>
fn sub(self, rhs: ExactMatrix<T>) -> ExactMatrix<T>
- operation. Read moreSource§impl<T: ExactScalar> Sub<&ExactMatrix<T>> for &ExactMatrix<T>
impl<T: ExactScalar> Sub<&ExactMatrix<T>> for &ExactMatrix<T>
Source§type Output = ExactMatrix<T>
type Output = ExactMatrix<T>
- operator.Source§fn sub(self, rhs: &ExactMatrix<T>) -> ExactMatrix<T>
fn sub(self, rhs: &ExactMatrix<T>) -> ExactMatrix<T>
- operation. Read moreSource§impl<T: ExactScalar> Sub<&ExactMatrix<T>> for ExactMatrix<T>
impl<T: ExactScalar> Sub<&ExactMatrix<T>> for ExactMatrix<T>
Source§type Output = ExactMatrix<T>
type Output = ExactMatrix<T>
- operator.Source§fn sub(self, rhs: &ExactMatrix<T>) -> ExactMatrix<T>
fn sub(self, rhs: &ExactMatrix<T>) -> ExactMatrix<T>
- operation. Read moreSource§impl<T: ExactScalar> Sub<ExactMatrix<T>> for &ExactMatrix<T>
impl<T: ExactScalar> Sub<ExactMatrix<T>> for &ExactMatrix<T>
Source§type Output = ExactMatrix<T>
type Output = ExactMatrix<T>
- operator.Source§fn sub(self, rhs: ExactMatrix<T>) -> ExactMatrix<T>
fn sub(self, rhs: ExactMatrix<T>) -> ExactMatrix<T>
- operation. Read moreAuto Trait Implementations§
impl<T> Freeze for ExactMatrix<T>
impl<T> RefUnwindSafe for ExactMatrix<T>where
Vec<T>: RefUnwindSafe,
impl<T> Send for ExactMatrix<T>
impl<T> Sync for ExactMatrix<T>
impl<T> Unpin for ExactMatrix<T>
impl<T> UnsafeUnpin for ExactMatrix<T>where
Vec<T>: UnsafeUnpin,
impl<T> UnwindSafe for ExactMatrix<T>where
Vec<T>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more