/// Solves the generalized eigenvalue problem.
///
/// # Panics
///
/// Panics if the shapes of the matrices are different.
Solves the generalized eigenvalue problem.
Solves the generalized eigenvalue problem .
fn eigh_inplace(&mut self, uplo: UPLO) -> Result<(Self::EigVal, &mut Self)> {
        assert_eq!(
            self.0.shape(),
            self.1.shape(),
            "The shapes of the matrices must be identical.",
        );
        let layout = self.0.square_layout()?;
        // XXX Force layout to be Fortran (see #146)
        match layout {
            MatrixLayout::C { .. } => self.0.swap_axes(0, 1),
            MatrixLayout::F { .. } => {}
        }
        let layout = self.1.square_layout()?;
        match layout {
            MatrixLayout::C { .. } => self.1.swap_axes(0, 1),
            MatrixLayout::F { .. } => {}
        }
        let s = A::eigh_generalized(
            true,
            self.0.square_layout()?,
            uplo,
            self.0.as_allocated_mut()?,
            self.1.as_allocated_mut()?,
        )?;
        Ok((ArrayBase::from(s), self))
    }
fn eigh_inplace ( & mut self , uplo : UPLO ) -> Result < ( Self :: EigVal , & mut Self ) > { assert_eq ! ( self 0 shape ( ) self 1 shape ( ) " " ) ; let layout = self . 0 . square_layout ( ) ? ; // XXX Force layout to be Fortran (see #146) match layout { MatrixLayout :: C { .. } => self . 0 . swap_axes ( 0 , 1 ) , MatrixLayout :: F { .. } => { } } let layout = self . 1 . square_layout ( ) ? ; match layout { MatrixLayout :: C { .. } => self . 1 . swap_axes ( 0 , 1 ) , MatrixLayout :: F { .. } => { } } let s = A :: eigh_generalized ( true , self . 0 . square_layout ( ) ? , uplo , self . 0 . as_allocated_mut ( ) ? , self . 1 . as_allocated_mut ( ) ? , ) ? ; Ok ( ( ArrayBase :: from ( s ) , self ) ) }
Solves the generalized eigenvalue problem.
Solves the generalized eigenvalue problem .
&mut self
uplo
UPLO
panics
Panics if the shapes of the matrices are different.
Panics if the shapes of the matrices are different .