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>,
    {
        /*
         How the eigenvectors are built up:

         Since the input entries are all real, the generalized eigenvalues if complex come in pairs
         as a consequence of the [complex conjugate root thorem](https://en.wikipedia.org/wiki/Complex_conjugate_root_theorem)
         The Lapack routine output reflects this by expecting the user to unpack the real and complex eigenvalues associated
         eigenvectors from the real matrix output via the following procedure

         (Note: VL stands for the lapack real matrix output containing the left eigenvectors as columns,
                VR stands for the lapack real matrix output containing the right eigenvectors as columns)

         If the j-th and (j+1)-th eigenvalues form a complex conjugate pair,
         then

          u(j) = VL(:,j)+i*VL(:,j+1)
          u(j+1) = VL(:,j)-i*VL(:,j+1)

         and

          u(j) = VR(:,j)+i*VR(:,j+1)
          v(j+1) = VR(:,j)-i*VR(:,j+1).
        */

        let n = self.vsl.shape().0;

        let mut l = self.vsl.map(|x| Complex::new(x, T::RealField::zero()));

        let mut r = self.vsr.map(|x| Complex::new(x, T::RealField::zero()));

        let eigenvalues = self.raw_eigenvalues();

        let mut c = 0;

        while c < n {
            if eigenvalues[c].0.im.abs() != T::RealField::zero() && c + 1 < n {
                // taking care of the left eigenvector matrix
                l.column_mut(c).zip_apply(&self.vsl.column(c + 1), |r, i| {
                    *r = Complex::new(r.re.clone(), i.clone());
                });
                l.column_mut(c + 1).zip_apply(&self.vsl.column(c), |i, r| {
                    *i = Complex::new(r.clone(), -i.re.clone());
                });

                // taking care of the right eigenvector matrix
                r.column_mut(c).zip_apply(&self.vsr.column(c + 1), |r, i| {
                    *r = Complex::new(r.re.clone(), i.clone());
                });
                r.column_mut(c + 1).zip_apply(&self.vsr.column(c), |i, r| {
                    *i = Complex::new(r.clone(), -i.re.clone());
                });

                c += 2;
            } else {
                c += 1;
            }
        }

        (l, r)
    }
/// 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.
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.
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 .
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>,
    {
        /*
         How the eigenvectors are built up:
         Since the input entries are all real, the generalized eigenvalues if complex come in pairs
         as a consequence of the [complex conjugate root thorem](https://en.wikipedia.org/wiki/Complex_conjugate_root_theorem)
         The Lapack routine output reflects this by expecting the user to unpack the real and complex eigenvalues associated
         eigenvectors from the real matrix output via the following procedure
         (Note: VL stands for the lapack real matrix output containing the left eigenvectors as columns,
                VR stands for the lapack real matrix output containing the right eigenvectors as columns)
         If the j-th and (j+1)-th eigenvalues form a complex conjugate pair,
         then
          u(j) = VL(:,j)+i*VL(:,j+1)
          u(j+1) = VL(:,j)-i*VL(:,j+1)
         and
          u(j) = VR(:,j)+i*VR(:,j+1)
          v(j+1) = VR(:,j)-i*VR(:,j+1).
        */
        let n = self.vsl.shape().0;
        let mut l = self.vsl.map(|x| Complex::new(x, T::RealField::zero()));
        let mut r = self.vsr.map(|x| Complex::new(x, T::RealField::zero()));
        let eigenvalues = self.raw_eigenvalues();
        let mut c = 0;
        while c < n {
            if eigenvalues[c].0.im.abs() != T::RealField::zero() && c + 1 < n {
                // taking care of the left eigenvector matrix
                l.column_mut(c).zip_apply(&self.vsl.column(c + 1), |r, i| {
                    *r = Complex::new(r.re.clone(), i.clone());
                });
                l.column_mut(c + 1).zip_apply(&self.vsl.column(c), |i, r| {
                    *i = Complex::new(r.clone(), -i.re.clone());
                });
                // taking care of the right eigenvector matrix
                r.column_mut(c).zip_apply(&self.vsr.column(c + 1), |r, i| {
                    *r = Complex::new(r.re.clone(), i.clone());
                });
                r.column_mut(c + 1).zip_apply(&self.vsr.column(c), |i, r| {
                    *i = Complex::new(r.clone(), -i.re.clone());
                });
                c += 2;
            } else {
                c += 1;
            }
        }
        (l, r)
    }
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 > , { /*
         How the eigenvectors are built up:

         Since the input entries are all real, the generalized eigenvalues if complex come in pairs
         as a consequence of the [complex conjugate root thorem](https://en.wikipedia.org/wiki/Complex_conjugate_root_theorem)
         The Lapack routine output reflects this by expecting the user to unpack the real and complex eigenvalues associated
         eigenvectors from the real matrix output via the following procedure

         (Note: VL stands for the lapack real matrix output containing the left eigenvectors as columns,
                VR stands for the lapack real matrix output containing the right eigenvectors as columns)

         If the j-th and (j+1)-th eigenvalues form a complex conjugate pair,
         then

          u(j) = VL(:,j)+i*VL(:,j+1)
          u(j+1) = VL(:,j)-i*VL(:,j+1)

         and

          u(j) = VR(:,j)+i*VR(:,j+1)
          v(j+1) = VR(:,j)-i*VR(:,j+1).
        */ let n = self . vsl . shape ( ) . 0 ; let mut l = self . vsl . map ( | x | Complex :: new ( x , T :: RealField :: zero ( ) ) ) ; let mut r = self . vsr . map ( | x | Complex :: new ( x , T :: RealField :: zero ( ) ) ) ; let eigenvalues = self . raw_eigenvalues ( ) ; let mut c = 0 ; while c < n { if eigenvalues [ c ] . 0 . im . abs ( ) != T :: RealField :: zero ( ) && c + 1 < n { // taking care of the left eigenvector matrix l . column_mut ( c ) . zip_apply ( & self . vsl . column ( c + 1 ) , | r , i | { * r = Complex :: new ( r . re . clone ( ) , i . clone ( ) ) ; } ) ; l . column_mut ( c + 1 ) . zip_apply ( & self . vsl . column ( c ) , | i , r | { * i = Complex :: new ( r . clone ( ) , - i . re . clone ( ) ) ; } ) ; // taking care of the right eigenvector matrix r . column_mut ( c ) . zip_apply ( & self . vsr . column ( c + 1 ) , | r , i | { * r = Complex :: new ( r . re . clone ( ) , i . clone ( ) ) ; } ) ; r . column_mut ( c + 1 ) . zip_apply ( & self . vsr . column ( c ) , | i , r | { * i = Complex :: new ( r . clone ( ) , - i . re . clone ( ) ) ; } ) ; c += 2 ; } else { c += 1 ; } } ( l , r ) }
Calculates the generalized eigenvectors (left and right) associated with the generalized eigenvalues
Outputs two matrices.
Calculates the generalized eigenvectors ( left and right ) associated with the generalized eigenvalues Outputs two matrices .
&self
&self