Struct nalgebra_lapack::GeneralizedEigen
source · pub struct GeneralizedEigen<T: Scalar, D: Dim>where
DefaultAllocator: Allocator<T, D> + Allocator<T, D, D>,{ /* private fields */ }
Expand description
Generalized eigenvalues and generalized eigenvectors (left and right) of a pair of N*N real square matrices.
Each generalized eigenvalue (lambda) satisfies determinant(A - lambda*B) = 0
The right eigenvector v(j) corresponding to the eigenvalue lambda(j) of (A,B) satisfies
A * v(j) = lambda(j) * B * v(j).
The left eigenvector u(j) corresponding to the eigenvalue lambda(j) of (A,B) satisfies
u(j)**H * A = lambda(j) * u(j)**H * B . where u(j)**H is the conjugate-transpose of u(j).
Implementations§
source§impl<T: GeneralizedEigenScalar + RealField + Copy, D: Dim> GeneralizedEigen<T, D>where
DefaultAllocator: Allocator<T, D, D> + Allocator<T, D>,
impl<T: GeneralizedEigenScalar + RealField + Copy, D: Dim> GeneralizedEigen<T, D>where
DefaultAllocator: Allocator<T, D, D> + Allocator<T, D>,
sourcepub fn new(a: OMatrix<T, D, D>, b: OMatrix<T, D, D>) -> Self
pub fn new(a: OMatrix<T, D, D>, b: OMatrix<T, D, D>) -> Self
Attempts to compute the generalized eigenvalues, and left and right associated eigenvectors via the raw returns from LAPACK’s dggev and sggev routines
Panics if the method did not converge.
sourcepub fn try_new(a: OMatrix<T, D, D>, b: OMatrix<T, D, D>) -> Option<Self>
pub fn try_new(a: OMatrix<T, D, D>, b: OMatrix<T, D, D>) -> Option<Self>
Attempts to compute the generalized eigenvalues (and eigenvectors) via the raw returns from LAPACK’s dggev and sggev routines
Returns None
if the method did not converge.
sourcepub fn eigenvectors(
&self
) -> (OMatrix<Complex<T>, D, D>, OMatrix<Complex<T>, D, D>)where
DefaultAllocator: Allocator<Complex<T>, D, D> + Allocator<Complex<T>, D> + Allocator<(Complex<T>, T), D>,
pub fn eigenvectors(
&self
) -> (OMatrix<Complex<T>, D, D>, OMatrix<Complex<T>, D, D>)where
DefaultAllocator: Allocator<Complex<T>, D, D> + Allocator<Complex<T>, D> + Allocator<(Complex<T>, T), D>,
Calculates the generalized eigenvectors (left and right) associated with the generalized eigenvalues
Outputs two matrices. The first output matrix contains the left eigenvectors of the generalized eigenvalues as columns. The second matrix contains the right eigenvectors of the generalized eigenvalues as columns.
sourcepub fn raw_eigenvalues(&self) -> OVector<(Complex<T>, T), D>where
DefaultAllocator: Allocator<(Complex<T>, T), D>,
pub fn raw_eigenvalues(&self) -> OVector<(Complex<T>, T), D>where
DefaultAllocator: Allocator<(Complex<T>, T), D>,
Outputs the unprocessed (almost) version of generalized eigenvalues ((alphar, alphai), beta) straight from LAPACK
Trait Implementations§
source§impl<T: Clone + Scalar, D: Clone + Dim> Clone for GeneralizedEigen<T, D>where
DefaultAllocator: Allocator<T, D> + Allocator<T, D, D>,
impl<T: Clone + Scalar, D: Clone + Dim> Clone for GeneralizedEigen<T, D>where
DefaultAllocator: Allocator<T, D> + Allocator<T, D, D>,
source§fn clone(&self) -> GeneralizedEigen<T, D>
fn clone(&self) -> GeneralizedEigen<T, D>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<T: Debug + Scalar, D: Debug + Dim> Debug for GeneralizedEigen<T, D>where
DefaultAllocator: Allocator<T, D> + Allocator<T, D, D>,
impl<T: Debug + Scalar, D: Debug + Dim> Debug for GeneralizedEigen<T, D>where
DefaultAllocator: Allocator<T, D> + Allocator<T, D, D>,
impl<T: Scalar + Copy, D: Dim> Copy for GeneralizedEigen<T, D>where
DefaultAllocator: Allocator<T, D, D> + Allocator<T, D>,
OMatrix<T, D, D>: Copy,
OVector<T, D>: Copy,
Auto Trait Implementations§
impl<T, D> !RefUnwindSafe for GeneralizedEigen<T, D>
impl<T, D> !Send for GeneralizedEigen<T, D>
impl<T, D> !Sync for GeneralizedEigen<T, D>
impl<T, D> !Unpin for GeneralizedEigen<T, D>
impl<T, D> !UnwindSafe for GeneralizedEigen<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.