pub struct Matrix<const M: usize, const N: usize> { /* private fields */ }Implementations§
Source§impl<const M: usize, const N: usize> Matrix<M, N>
impl<const M: usize, const N: usize> Matrix<M, N>
pub const ZEROS: Self
pub const fn new(data: [[Complex64; N]; M]) -> Self
pub fn from_column_vectors(columns: [Vector<M>; N]) -> Self
pub fn to_column_vectors(self) -> [Vector<M>; N]
pub fn iter(&self) -> impl Iterator<Item = &Complex64>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Complex64>
pub fn epsilon(&self) -> f64
pub fn swap_row(&mut self, i: usize, j: usize)
pub fn multiply_row_by_scalar(&mut self, i: usize, scalar: Complex64)
pub fn add_row_with_scalar(&mut self, i: usize, j: usize, scalar: Complex64)
pub fn transpose(&self) -> Matrix<N, M>
pub fn gaussian_elimination(self) -> (Matrix<M, N>, Matrix<M, M>, usize)
pub fn rank(&self) -> usize
Source§impl<const M: usize> Matrix<M, M>
impl<const M: usize> Matrix<M, M>
pub fn diagonal(data: [Complex64; M]) -> Self
pub fn identity() -> Self
pub fn determinant(&self) -> Complex64
pub fn gauss_jordan_elimination(self) -> (Matrix<M, M>, Matrix<M, M>)
pub fn inverse(self) -> Option<Matrix<M, M>>
pub fn qr_decomposition(self) -> (Matrix<M, M>, Matrix<M, M>)
pub fn schur_form(self, iterations: usize) -> Matrix<M, M>
pub fn eigenvalues(&self, iterations: usize) -> [Complex64; M]
pub fn eigenvectors(&self, iterations: usize) -> [Vector<M>; M]
Trait Implementations§
Source§impl<const M: usize, const N: usize> AddAssign for Matrix<M, N>
impl<const M: usize, const N: usize> AddAssign for Matrix<M, N>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl<const M: usize, const N: usize> MulAssign<Complex<f64>> for Matrix<M, N>
impl<const M: usize, const N: usize> MulAssign<Complex<f64>> for Matrix<M, N>
Source§fn mul_assign(&mut self, rhs: Complex64)
fn mul_assign(&mut self, rhs: Complex64)
Performs the
*= operation. Read moreAuto Trait Implementations§
impl<const M: usize, const N: usize> Freeze for Matrix<M, N>
impl<const M: usize, const N: usize> RefUnwindSafe for Matrix<M, N>
impl<const M: usize, const N: usize> Send for Matrix<M, N>
impl<const M: usize, const N: usize> Sync for Matrix<M, N>
impl<const M: usize, const N: usize> Unpin for Matrix<M, N>
impl<const M: usize, const N: usize> UnwindSafe for Matrix<M, N>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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>
Converts
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>
Converts
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