Struct nalgebra_lapack::Eigen
source · pub struct Eigen<T: Scalar, D: Dim>where
DefaultAllocator: Allocator<T, D> + Allocator<T, D, D>,{
pub eigenvalues_re: OVector<T, D>,
pub eigenvalues_im: OVector<T, D>,
pub eigenvectors: Option<OMatrix<T, D, D>>,
pub left_eigenvectors: Option<OMatrix<T, D, D>>,
}
Expand description
Eigendecomposition of a real square matrix with real or complex eigenvalues.
Fields§
§eigenvalues_re: OVector<T, D>
The real parts of eigenvalues of the decomposed matrix.
eigenvalues_im: OVector<T, D>
The imaginary parts of the eigenvalues of the decomposed matrix.
eigenvectors: Option<OMatrix<T, D, D>>
The (right) eigenvectors of the decomposed matrix.
left_eigenvectors: Option<OMatrix<T, D, D>>
The left eigenvectors of the decomposed matrix.
Implementations§
source§impl<T: EigenScalar + RealField, D: Dim> Eigen<T, D>where
DefaultAllocator: Allocator<T, D, D> + Allocator<T, D>,
impl<T: EigenScalar + RealField, D: Dim> Eigen<T, D>where
DefaultAllocator: Allocator<T, D, D> + Allocator<T, D>,
sourcepub fn new(
m: OMatrix<T, D, D>,
left_eigenvectors: bool,
eigenvectors: bool
) -> Option<Eigen<T, D>>
pub fn new(
m: OMatrix<T, D, D>,
left_eigenvectors: bool,
eigenvectors: bool
) -> Option<Eigen<T, D>>
Computes the eigenvalues and eigenvectors of the square matrix m
.
If eigenvectors
is false
then, the eigenvectors are not computed explicitly.
sourcepub fn eigenvalues_are_real(&self) -> bool
pub fn eigenvalues_are_real(&self) -> bool
Returns true
if all the eigenvalues are real.
sourcepub fn determinant(&self) -> Complex<T>
pub fn determinant(&self) -> Complex<T>
The determinant of the decomposed matrix.
sourcepub fn get_real_elements(
&self
) -> (Vec<T>, Option<Vec<OVector<T, D>>>, Option<Vec<OVector<T, D>>>)where
DefaultAllocator: Allocator<T, D>,
pub fn get_real_elements(
&self
) -> (Vec<T>, Option<Vec<OVector<T, D>>>, Option<Vec<OVector<T, D>>>)where
DefaultAllocator: Allocator<T, D>,
Returns a tuple of vectors. The elements of the tuple are the real parts of the eigenvalues, left eigenvectors and right eigenvectors respectively.
sourcepub fn get_complex_elements(
&self
) -> (Option<Vec<Complex<T>>>, Option<Vec<OVector<Complex<T>, D>>>, Option<Vec<OVector<Complex<T>, D>>>)where
DefaultAllocator: Allocator<Complex<T>, D>,
pub fn get_complex_elements(
&self
) -> (Option<Vec<Complex<T>>>, Option<Vec<OVector<Complex<T>, D>>>, Option<Vec<OVector<Complex<T>, D>>>)where
DefaultAllocator: Allocator<Complex<T>, D>,
Returns a tuple of vectors. The elements of the tuple are the complex eigenvalues, complex left eigenvectors and complex right eigenvectors respectively. The elements appear as conjugate pairs within each vector, with the positive of the pair always being first.
Trait Implementations§
source§impl<T: Clone + Scalar, D: Clone + Dim> Clone for Eigen<T, D>where
DefaultAllocator: Allocator<T, D> + Allocator<T, D, D>,
impl<T: Clone + Scalar, D: Clone + Dim> Clone for Eigen<T, D>where
DefaultAllocator: Allocator<T, D> + Allocator<T, D, D>,
source§impl<T: Debug + Scalar, D: Debug + Dim> Debug for Eigen<T, D>where
DefaultAllocator: Allocator<T, D> + Allocator<T, D, D>,
impl<T: Debug + Scalar, D: Debug + Dim> Debug for Eigen<T, D>where
DefaultAllocator: Allocator<T, D> + Allocator<T, D, D>,
impl<T: Scalar + Copy, D: Dim> Copy for Eigen<T, D>where
DefaultAllocator: Allocator<T, D> + Allocator<T, D, D>,
OVector<T, D>: Copy,
OMatrix<T, D, D>: Copy,
Auto Trait Implementations§
impl<T, D> !RefUnwindSafe for Eigen<T, D>
impl<T, D> !Send for Eigen<T, D>
impl<T, D> !Sync for Eigen<T, D>
impl<T, D> !Unpin for Eigen<T, D>
impl<T, D> !UnwindSafe for Eigen<T, D>
Blanket Implementations§
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.