Expression of a selfadjoint matrix from a triangular part of a dense matrix.
MatrixType | the type of the dense matrix storing the coefficients |
TriangularPart | can be either Lower or Upper |
This class is an expression of a sefladjoint matrix from a triangular part of a matrix with given dense storage of the coefficients. It is the return type of MatrixBase::selfadjointView() and most of the time this is the only way that it is used.
typedef Matrix< RealScalar, internal::traits< MatrixType >::ColsAtCompileTime, 1 > | EigenvaluesReturnType |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef internal::traits< SelfAdjointView >::Scalar | Scalar |
The type of coefficients in this matrix. |
|
| |
typedef Eigen::Index | Index |
The interface type of indices. More... |
|
const AdjointReturnType | adjoint () const |
Scalar | coeff (Index row, Index col) const |
Scalar & | coeffRef (Index row, Index col) |
const ConjugateReturnType | conjugate () const |
template<bool Cond> | |
internal::conditional< Cond, ConjugateReturnType, ConstSelfAdjointView >::type | conjugateIf () const |
MatrixType::ConstDiagonalReturnType | diagonal () const |
EigenvaluesReturnType | eigenvalues () const |
Computes the eigenvalues of a matrix. More... |
|
const LDLT< PlainObject, UpLo > | ldlt () const |
const LLT< PlainObject, UpLo > | llt () const |
template<typename OtherDerived > | |
const Product< SelfAdjointView, OtherDerived > | operator* (const MatrixBase< OtherDerived > &rhs) const |
RealScalar | operatorNorm () const |
Computes the L2 operator norm. More... |
|
template<typename DerivedU , typename DerivedV > | |
SelfAdjointView & | rankUpdate (const MatrixBase< DerivedU > &u, const MatrixBase< DerivedV > &v, const Scalar &alpha=Scalar(1)) |
template<typename DerivedU > | |
SelfAdjointView & | rankUpdate (const MatrixBase< DerivedU > &u, const Scalar &alpha=Scalar(1)) |
TransposeReturnType | transpose () |
const ConstTransposeReturnType | transpose () const |
template<unsigned int TriMode> | |
internal::conditional<(TriMode &(Upper|Lower))==(UpLo &(Upper|Lower)), TriangularView< MatrixType, TriMode >, TriangularView< typename MatrixType::AdjointReturnType, TriMode > >::type | triangularView () const |
| |
void | copyCoeff (Index row, Index col, Other &other) |
void | evalTo (MatrixBase< DenseDerived > &other) const |
void | evalToLazy (MatrixBase< DenseDerived > &other) const |
| |
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
Derived & | derived () |
const Derived & | derived () const |
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
typedef Matrix<RealScalar, internal::traits<MatrixType>::ColsAtCompileTime, 1> Eigen::SelfAdjointView< _MatrixType, UpLo >::EigenvaluesReturnType |
Return type of eigenvalues()
typedef NumTraits<Scalar>::Real Eigen::SelfAdjointView< _MatrixType, UpLo >::RealScalar |
Real part of Scalar
| inline |
| inline |
| inline |
| inline |
| inline |
*this
if Cond==true, returns *this
otherwise.
| inline |
*this
This method simply returns the diagonal of the nested expression, thus by-passing the SelfAdjointView decorator.
| inline |
Computes the eigenvalues of a matrix.
This is defined in the Eigenvalues module.
#include <Eigen/Eigenvalues>
This function computes the eigenvalues with the help of the SelfAdjointEigenSolver class. The eigenvalues are repeated according to their algebraic multiplicity, so there are as many eigenvalues as rows in the matrix.
Example:
MatrixXd ones = MatrixXd::Ones(3,3); VectorXd eivals = ones.selfadjointView<Lower>().eigenvalues(); cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << eivals << endl;
Output:
The eigenvalues of the 3x3 matrix of ones are: -3.09e-16 0 3
| inline |
This is defined in the Cholesky module.
#include <Eigen/Cholesky>
*this
| inline |
This is defined in the Cholesky module.
#include <Eigen/Cholesky>
*this
| inline |
Efficient triangular matrix times vector/matrix product
| inline |
Computes the L2 operator norm.
This is defined in the Eigenvalues module.
#include <Eigen/Eigenvalues>
This function computes the L2 operator norm of a self-adjoint matrix. For a self-adjoint matrix, the operator norm is the largest eigenvalue.
The current implementation uses the eigenvalues of the matrix, as computed by eigenvalues(), to compute the operator norm of the matrix.
Example:
MatrixXd ones = MatrixXd::Ones(3,3); cout << "The operator norm of the 3x3 matrix of ones is " << ones.selfadjointView<Lower>().operatorNorm() << endl;
Output:
The operator norm of the 3x3 matrix of ones is 3
SelfAdjointView& Eigen::SelfAdjointView< _MatrixType, UpLo >::rankUpdate | ( | const MatrixBase< DerivedU > & | u, |
const MatrixBase< DerivedV > & | v, | ||
const Scalar & |
alpha = Scalar(1) | ||
) |
Perform a symmetric rank 2 update of the selfadjoint matrix *this
: \( this = this + \alpha u v^* + conj(\alpha) v u^* \)
*this
The vectors u and v
must be column vectors, however they can be a adjoint expression without any overhead. Only the meaningful triangular part of the matrix is updated, the rest is left unchanged.
SelfAdjointView& Eigen::SelfAdjointView< _MatrixType, UpLo >::rankUpdate | ( | const MatrixBase< DerivedU > & | u, |
const Scalar & |
alpha = Scalar(1) | ||
) |
Perform a symmetric rank K update of the selfadjoint matrix *this
: \( this = this + \alpha ( u u^* ) \) where u is a vector or matrix.
*this
Note that to perform \( this = this + \alpha ( u^* u ) \) you can simply call this function with u.adjoint().
| inline |
| inline |
| inline |
The parameter TriMode can have the following values: Upper
, StrictlyUpper
, UnitUpper
, Lower
, StrictlyLower
, UnitLower
.
If TriMode
references the same triangular part than *this
, then this method simply return a TriangularView
of the nested expression, otherwise, the nested expression is first transposed, thus returning a TriangularView<Transpose<MatrixType>>
object.
© Eigen.
Licensed under the MPL2 License.
https://eigen.tuxfamily.org/dox/classEigen_1_1SelfAdjointView.html