pub struct DenseMatrix<S: Scalar + Entity> { /* private fields */ }Expand description
Dense matrix backed by faer.
Implementations§
Source§impl<S: Scalar + SimpleEntity + Conjugate<Canonical = S> + ComplexField> DenseMatrix<S>
impl<S: Scalar + SimpleEntity + Conjugate<Canonical = S> + ComplexField> DenseMatrix<S>
Sourcepub fn eigh(&self) -> Result<SymEigenDecomposition<S>, LinalgError>
pub fn eigh(&self) -> Result<SymEigenDecomposition<S>, LinalgError>
Symmetric eigendecomposition.
Sourcepub fn eigvalsh(&self) -> Result<Vec<S>, LinalgError>
pub fn eigvalsh(&self) -> Result<Vec<S>, LinalgError>
Symmetric eigenvalues only (ascending order).
Source§impl DenseMatrix<f64>
impl DenseMatrix<f64>
Source§impl DenseMatrix<f32>
impl DenseMatrix<f32>
Source§impl<S: Scalar + Entity> DenseMatrix<S>
impl<S: Scalar + Entity> DenseMatrix<S>
Sourcepub fn as_faer_mut(&mut self) -> MatMut<'_, S>
pub fn as_faer_mut(&mut self) -> MatMut<'_, S>
Get mutable reference to underlying faer matrix.
Sourcepub fn from_row_major(rows: usize, cols: usize, data: &[S]) -> Self
pub fn from_row_major(rows: usize, cols: usize, data: &[S]) -> Self
Create from row-major data.
Sourcepub fn from_col_major(rows: usize, cols: usize, data: &[S]) -> Self
pub fn from_col_major(rows: usize, cols: usize, data: &[S]) -> Self
Create from column-major data.
Sourcepub fn to_row_major(&self) -> Vec<S>
pub fn to_row_major(&self) -> Vec<S>
Convert to row-major vector.
Sourcepub fn norm_frobenius(&self) -> S
pub fn norm_frobenius(&self) -> S
Frobenius norm.
Source§impl<S: Scalar + SimpleEntity + Conjugate<Canonical = S> + ComplexField> DenseMatrix<S>
impl<S: Scalar + SimpleEntity + Conjugate<Canonical = S> + ComplexField> DenseMatrix<S>
Sourcepub fn svd(&self) -> Result<SvdDecomposition<S>, LinalgError>
pub fn svd(&self) -> Result<SvdDecomposition<S>, LinalgError>
Compute full SVD.
Sourcepub fn thin_svd(&self) -> Result<ThinSvdDecomposition<S>, LinalgError>
pub fn thin_svd(&self) -> Result<ThinSvdDecomposition<S>, LinalgError>
Compute thin SVD.
Sourcepub fn singular_values(&self) -> Vec<S>
pub fn singular_values(&self) -> Vec<S>
Compute singular values only (decreasing order).
Sourcepub fn pinv(&self) -> Result<DenseMatrix<S>, LinalgError>
pub fn pinv(&self) -> Result<DenseMatrix<S>, LinalgError>
Moore-Penrose pseudoinverse via thin SVD.
Trait Implementations§
Source§impl<S: Clone + Scalar + Entity> Clone for DenseMatrix<S>
impl<S: Clone + Scalar + Entity> Clone for DenseMatrix<S>
Source§fn clone(&self) -> DenseMatrix<S>
fn clone(&self) -> DenseMatrix<S>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S: Scalar + SimpleEntity + Conjugate<Canonical = S> + ComplexField> LUSolver<S> for DenseMatrix<S>
impl<S: Scalar + SimpleEntity + Conjugate<Canonical = S> + ComplexField> LUSolver<S> for DenseMatrix<S>
Source§fn lu_factor(&self) -> Result<LUFactorization<S>, LinalgError>
fn lu_factor(&self) -> Result<LUFactorization<S>, LinalgError>
Compute and store LU factorization.
Source§impl<S: Scalar + SimpleEntity + Conjugate<Canonical = S> + ComplexField> Matrix<S> for DenseMatrix<S>
impl<S: Scalar + SimpleEntity + Conjugate<Canonical = S> + ComplexField> Matrix<S> for DenseMatrix<S>
Source§fn add_scaled(&mut self, alpha: S, other: &Self)
fn add_scaled(&mut self, alpha: S, other: &Self)
Add another matrix: self += alpha * other.
Auto Trait Implementations§
impl<S> Freeze for DenseMatrix<S>
impl<S> RefUnwindSafe for DenseMatrix<S>where
<<S as Entity>::Group as ForCopyType>::FaerOfCopy<NonNull<<S as Entity>::Unit>>: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for DenseMatrix<S>
impl<S> Sync for DenseMatrix<S>
impl<S> Unpin for DenseMatrix<S>where
<<S as Entity>::Group as ForCopyType>::FaerOfCopy<NonNull<<S as Entity>::Unit>>: Unpin,
S: Unpin,
impl<S> UnsafeUnpin for DenseMatrix<S>
impl<S> UnwindSafe for DenseMatrix<S>where
<<S as Entity>::Group as ForCopyType>::FaerOfCopy<NonNull<<S as Entity>::Unit>>: UnwindSafe,
S: 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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