pub struct MatrixDecomposition;Expand description
Matrix decomposition utilities
Implementations§
Source§impl MatrixDecomposition
impl MatrixDecomposition
Sourcepub fn lu_decomposition(
matrix: &Array2<f64>,
) -> Result<(Array2<f64>, Array2<f64>, Array2<f64>), UtilsError>
pub fn lu_decomposition( matrix: &Array2<f64>, ) -> Result<(Array2<f64>, Array2<f64>, Array2<f64>), UtilsError>
Compute LU decomposition with partial pivoting Returns (L, U, P) where PA = LU
Sourcepub fn qr_decomposition(
matrix: &Array2<f64>,
) -> Result<(Array2<f64>, Array2<f64>), UtilsError>
pub fn qr_decomposition( matrix: &Array2<f64>, ) -> Result<(Array2<f64>, Array2<f64>), UtilsError>
Compute QR decomposition using Gram-Schmidt process Returns (Q, R) where A = QR
Sourcepub fn svd_power_iteration(
matrix: &Array2<f64>,
max_iterations: usize,
tolerance: f64,
) -> Result<(Array2<f64>, Array1<f64>, Array2<f64>), UtilsError>
pub fn svd_power_iteration( matrix: &Array2<f64>, max_iterations: usize, tolerance: f64, ) -> Result<(Array2<f64>, Array1<f64>, Array2<f64>), UtilsError>
Compute Singular Value Decomposition (SVD) using power iteration Returns (U, S, Vt) where A = U * S * Vt
Sourcepub fn cholesky_decomposition(
matrix: &Array2<f64>,
) -> Result<Array2<f64>, UtilsError>
pub fn cholesky_decomposition( matrix: &Array2<f64>, ) -> Result<Array2<f64>, UtilsError>
Compute Cholesky decomposition for positive definite matrices Returns L where A = L * L^T
Auto Trait Implementations§
impl Freeze for MatrixDecomposition
impl RefUnwindSafe for MatrixDecomposition
impl Send for MatrixDecomposition
impl Sync for MatrixDecomposition
impl Unpin for MatrixDecomposition
impl UnwindSafe for MatrixDecomposition
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
Mutably borrows from an owned value. Read more
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