Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Eigen::SelfAdjointView< _MatrixType, UpLo > Class Template Reference

Expression of a selfadjoint matrix from a triangular part of a dense matrix. More...

#include <src/eigen/Eigen/src/Core/SelfAdjointView.h>

+ Inheritance diagram for Eigen::SelfAdjointView< _MatrixType, UpLo >:
+ Collaboration diagram for Eigen::SelfAdjointView< _MatrixType, UpLo >:

Public Types

enum  { Mode = internal::traits<SelfAdjointView>::Mode , Flags = internal::traits<SelfAdjointView>::Flags , TransposeMode = ((Mode & Upper) ? Lower : 0) | ((Mode & Lower) ? Upper : 0) }
 
typedef _MatrixType MatrixType
 
typedef TriangularBase< SelfAdjointViewBase
 
typedef internal::traits< SelfAdjointView >::MatrixTypeNested MatrixTypeNested
 
typedef internal::traits< SelfAdjointView >::MatrixTypeNestedCleaned MatrixTypeNestedCleaned
 
typedef MatrixTypeNestedCleaned NestedExpression
 
typedef internal::traits< SelfAdjointView >::Scalar Scalar
 The type of coefficients in this matrix.
 
typedef MatrixType::StorageIndex StorageIndex
 
typedef internal::remove_all< typenameMatrixType::ConjugateReturnType >::type MatrixConjugateReturnType
 
typedef MatrixType::PlainObject PlainObject
 
typedef SelfAdjointView< const MatrixConjugateReturnType, UpLo > ConjugateReturnType
 
typedef SelfAdjointView< const typename MatrixType::AdjointReturnType, TransposeModeAdjointReturnType
 
typedef SelfAdjointView< typename MatrixType::TransposeReturnType, TransposeModeTransposeReturnType
 
typedef SelfAdjointView< const typename MatrixType::ConstTransposeReturnType, TransposeModeConstTransposeReturnType
 
typedef NumTraits< Scalar >::Real RealScalar
 
typedef Matrix< RealScalar, internal::traits< MatrixType >::ColsAtCompileTime, 1 > EigenvaluesReturnType
 
enum  
 
typedef internal::traits< SelfAdjointView< _MatrixType, UpLo > >::StorageKind StorageKind
 
typedef internal::traits< SelfAdjointView< _MatrixType, UpLo > >::FullMatrixType DenseMatrixType
 
typedef DenseMatrixType DenseType
 
typedef SelfAdjointView< _MatrixType, UpLo > constNested
 
typedef Eigen::Index Index
 The interface type of indices.
 

Public Member Functions

EIGEN_DEVICE_FUNC SelfAdjointView (MatrixType &matrix)
 
EIGEN_DEVICE_FUNC Index rows () const
 
EIGEN_DEVICE_FUNC Index cols () const
 
EIGEN_DEVICE_FUNC Index outerStride () const
 
EIGEN_DEVICE_FUNC Index innerStride () const
 
EIGEN_DEVICE_FUNC Scalar coeff (Index row, Index col) const
 
EIGEN_DEVICE_FUNC ScalarcoeffRef (Index row, Index col)
 
EIGEN_DEVICE_FUNC const MatrixTypeNestedCleaned_expression () const
 
EIGEN_DEVICE_FUNC const MatrixTypeNestedCleanednestedExpression () const
 
EIGEN_DEVICE_FUNC MatrixTypeNestedCleanednestedExpression ()
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC const Product< SelfAdjointView, OtherDerived > operator* (const MatrixBase< OtherDerived > &rhs) const
 
template<typename DerivedU , typename DerivedV >
EIGEN_DEVICE_FUNC SelfAdjointViewrankUpdate (const MatrixBase< DerivedU > &u, const MatrixBase< DerivedV > &v, const Scalar &alpha=Scalar(1))
 
template<typename DerivedU >
EIGEN_DEVICE_FUNC SelfAdjointViewrankUpdate (const MatrixBase< DerivedU > &u, const Scalar &alpha=Scalar(1))
 
template<unsigned int TriMode>
EIGEN_DEVICE_FUNC internal::conditional<(TriMode &(Upper|Lower))==(UpLo &(Upper|Lower)), TriangularView< MatrixType, TriMode >, TriangularView< typenameMatrixType::AdjointReturnType, TriMode > >::type triangularView () const
 
EIGEN_DEVICE_FUNC const ConjugateReturnType conjugate () const
 
EIGEN_DEVICE_FUNC const AdjointReturnType adjoint () const
 
EIGEN_DEVICE_FUNC TransposeReturnType transpose ()
 
EIGEN_DEVICE_FUNC const ConstTransposeReturnType transpose () const
 
EIGEN_DEVICE_FUNC MatrixType::ConstDiagonalReturnType diagonal () const
 
const LLT< PlainObject, UpLo > llt () const
 
const LDLT< PlainObject, UpLo > ldlt () const
 
EIGEN_DEVICE_FUNC EigenvaluesReturnType eigenvalues () const
 Computes the eigenvalues of a matrix.
 
EIGEN_DEVICE_FUNC RealScalar operatorNorm () const
 Computes the L2 operator norm.
 
template<typename DerivedU >
SelfAdjointView< MatrixType, UpLo > & rankUpdate (const MatrixBase< DerivedU > &u, const Scalar &alpha)
 
template<typename DerivedU , typename DerivedV >
SelfAdjointView< MatrixType, UpLo > & rankUpdate (const MatrixBase< DerivedU > &u, const MatrixBase< DerivedV > &v, const Scalar &alpha)
 
void resize (Index rows, Index cols)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void copyCoeff (Index row, Index col, Other &other)
 
EIGEN_DEVICE_FUNC Scalar operator() (Index row, Index col) const
 
EIGEN_DEVICE_FUNC Scalaroperator() (Index row, Index col)
 
EIGEN_DEVICE_FUNC const SelfAdjointView< _MatrixType, UpLo > & derived () const
 
EIGEN_DEVICE_FUNC SelfAdjointView< _MatrixType, UpLo > & derived ()
 
EIGEN_DEVICE_FUNC void evalTo (MatrixBase< DenseDerived > &other) const
 
void evalTo (MatrixBase< DenseDerived > &other) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void evalTo (Dest &dst) const
 
EIGEN_DEVICE_FUNC void evalToLazy (MatrixBase< DenseDerived > &other) const
 
void evalToLazy (MatrixBase< DenseDerived > &other) const
 
EIGEN_DEVICE_FUNC DenseMatrixType toDenseMatrix () const
 
EIGEN_DEVICE_FUNC Derived & const_cast_derived () const
 
EIGEN_DEVICE_FUNC const Derived & const_derived () const
 
EIGEN_DEVICE_FUNC Index size () const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void addTo (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void subTo (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void applyThisOnTheRight (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void applyThisOnTheLeft (Dest &dst) const
 

Protected Member Functions

void check_coordinates (Index row, Index col) const
 
void check_coordinates_internal (Index, Index) const
 

Protected Attributes

MatrixTypeNested m_matrix
 

Friends

template<typename OtherDerived >
EIGEN_DEVICE_FUNC const Product< OtherDerived, SelfAdjointViewoperator* (const MatrixBase< OtherDerived > &lhs, const SelfAdjointView &rhs)
 
EIGEN_DEVICE_FUNC const SelfAdjointView< const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar, MatrixType, product), UpLo > operator* (const Scalar &s, const SelfAdjointView &mat)
 

Detailed Description

template<typename _MatrixType, unsigned int UpLo>
class Eigen::SelfAdjointView< _MatrixType, UpLo >

Expression of a selfadjoint matrix from a triangular part of a dense matrix.

Parameters
MatrixTypethe type of the dense matrix storing the coefficients
TriangularPartcan 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.

See also
class TriangularBase, MatrixBase::selfadjointView()

Member Typedef Documentation

◆ AdjointReturnType

template<typename _MatrixType , unsigned int UpLo>
typedef SelfAdjointView<const typename MatrixType::AdjointReturnType,TransposeMode> Eigen::SelfAdjointView< _MatrixType, UpLo >::AdjointReturnType

◆ Base

template<typename _MatrixType , unsigned int UpLo>
typedef TriangularBase<SelfAdjointView> Eigen::SelfAdjointView< _MatrixType, UpLo >::Base

◆ ConjugateReturnType

template<typename _MatrixType , unsigned int UpLo>
typedef SelfAdjointView<const MatrixConjugateReturnType,UpLo> Eigen::SelfAdjointView< _MatrixType, UpLo >::ConjugateReturnType

◆ ConstTransposeReturnType

template<typename _MatrixType , unsigned int UpLo>
typedef SelfAdjointView<const typename MatrixType::ConstTransposeReturnType,TransposeMode> Eigen::SelfAdjointView< _MatrixType, UpLo >::ConstTransposeReturnType

◆ DenseMatrixType

typedef internal::traits<SelfAdjointView< _MatrixType, UpLo > >::FullMatrixType Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::DenseMatrixType
inherited

◆ DenseType

typedef DenseMatrixType Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::DenseType
inherited

◆ EigenvaluesReturnType

template<typename _MatrixType , unsigned int UpLo>
typedef Matrix<RealScalar, internal::traits<MatrixType>::ColsAtCompileTime, 1> Eigen::SelfAdjointView< _MatrixType, UpLo >::EigenvaluesReturnType

Return type of eigenvalues()

◆ Index

template<typename Derived >
typedef Eigen::Index Eigen::EigenBase< Derived >::Index
inherited

The interface type of indices.

To change this, #define the preprocessor symbol EIGEN_DEFAULT_DENSE_INDEX_TYPE.

See also
StorageIndex, TopicPreprocessorDirectives.

◆ MatrixConjugateReturnType

template<typename _MatrixType , unsigned int UpLo>
typedef internal::remove_all<typenameMatrixType::ConjugateReturnType>::type Eigen::SelfAdjointView< _MatrixType, UpLo >::MatrixConjugateReturnType

◆ MatrixType

template<typename _MatrixType , unsigned int UpLo>
typedef _MatrixType Eigen::SelfAdjointView< _MatrixType, UpLo >::MatrixType

◆ MatrixTypeNested

template<typename _MatrixType , unsigned int UpLo>
typedef internal::traits<SelfAdjointView>::MatrixTypeNested Eigen::SelfAdjointView< _MatrixType, UpLo >::MatrixTypeNested

◆ MatrixTypeNestedCleaned

template<typename _MatrixType , unsigned int UpLo>
typedef internal::traits<SelfAdjointView>::MatrixTypeNestedCleaned Eigen::SelfAdjointView< _MatrixType, UpLo >::MatrixTypeNestedCleaned

◆ Nested

typedef SelfAdjointView< _MatrixType, UpLo > const& Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::Nested
inherited

◆ NestedExpression

template<typename _MatrixType , unsigned int UpLo>
typedef MatrixTypeNestedCleaned Eigen::SelfAdjointView< _MatrixType, UpLo >::NestedExpression

◆ PlainObject

template<typename _MatrixType , unsigned int UpLo>
typedef MatrixType::PlainObject Eigen::SelfAdjointView< _MatrixType, UpLo >::PlainObject

◆ RealScalar

template<typename _MatrixType , unsigned int UpLo>
typedef NumTraits<Scalar>::Real Eigen::SelfAdjointView< _MatrixType, UpLo >::RealScalar

Real part of Scalar

◆ Scalar

template<typename _MatrixType , unsigned int UpLo>
typedef internal::traits<SelfAdjointView>::Scalar Eigen::SelfAdjointView< _MatrixType, UpLo >::Scalar

The type of coefficients in this matrix.

◆ StorageIndex

template<typename _MatrixType , unsigned int UpLo>
typedef MatrixType::StorageIndex Eigen::SelfAdjointView< _MatrixType, UpLo >::StorageIndex

◆ StorageKind

typedef internal::traits<SelfAdjointView< _MatrixType, UpLo > >::StorageKind Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::StorageKind
inherited

◆ TransposeReturnType

template<typename _MatrixType , unsigned int UpLo>
typedef SelfAdjointView<typename MatrixType::TransposeReturnType,TransposeMode> Eigen::SelfAdjointView< _MatrixType, UpLo >::TransposeReturnType

Member Enumeration Documentation

◆ anonymous enum

template<typename _MatrixType , unsigned int UpLo>
anonymous enum
Enumerator
Mode 
Flags 
TransposeMode 
65 {
66 Mode = internal::traits<SelfAdjointView>::Mode,
67 Flags = internal::traits<SelfAdjointView>::Flags,
68 TransposeMode = ((Mode & Upper) ? Lower : 0) | ((Mode & Lower) ? Upper : 0)
69 };
@ TransposeMode
Definition SelfAdjointView.h:68
@ Flags
Definition SelfAdjointView.h:67
@ Mode
Definition SelfAdjointView.h:66
@ Lower
Definition Constants.h:204
@ Upper
Definition Constants.h:206

◆ anonymous enum

anonymous enum
inherited
31 {
32 Mode = internal::traits<Derived>::Mode,
33 RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,
34 ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
35 MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime,
36 MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime,
37
38 SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,
39 internal::traits<Derived>::ColsAtCompileTime>::ret),
44 MaxSizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::MaxRowsAtCompileTime,
45 internal::traits<Derived>::MaxColsAtCompileTime>::ret)
46
47 };

Constructor & Destructor Documentation

◆ SelfAdjointView()

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC Eigen::SelfAdjointView< _MatrixType, UpLo >::SelfAdjointView ( MatrixType matrix)
inlineexplicit
73 : m_matrix(matrix)
74 {
75 EIGEN_STATIC_ASSERT(UpLo==Lower || UpLo==Upper,SELFADJOINTVIEW_ACCEPTS_UPPER_AND_LOWER_MODE_ONLY);
76 }
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition StaticAssert.h:124
MatrixTypeNested m_matrix
Definition SelfAdjointView.h:253

References EIGEN_STATIC_ASSERT, Eigen::Lower, and Eigen::Upper.

Member Function Documentation

◆ _expression()

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC const MatrixTypeNestedCleaned & Eigen::SelfAdjointView< _MatrixType, UpLo >::_expression ( ) const
inline

◆ addTo()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::addTo ( Dest &  dst) const
inlineinherited
78 {
79 // This is the default implementation,
80 // derived class can reimplement it in a more optimized way.
81 typename Dest::PlainObject res(rows(),cols());
82 evalTo(res);
83 dst += res;
84 }
EIGEN_DEVICE_FUNC Index cols() const
Definition EigenBase.h:62
EIGEN_DEVICE_FUNC Index rows() const
Definition EigenBase.h:59
EIGEN_DEVICE_FUNC void evalTo(Dest &dst) const
Definition EigenBase.h:71

◆ adjoint()

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC const AdjointReturnType Eigen::SelfAdjointView< _MatrixType, UpLo >::adjoint ( ) const
inline
See also
MatrixBase::adjoint() const
204 { return AdjointReturnType(m_matrix.adjoint()); }
SelfAdjointView< const typename MatrixType::AdjointReturnType, TransposeMode > AdjointReturnType
Definition SelfAdjointView.h:200

References Eigen::SelfAdjointView< _MatrixType, UpLo >::m_matrix.

◆ applyThisOnTheLeft()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::applyThisOnTheLeft ( Dest &  dst) const
inlineinherited
110 {
111 // This is the default implementation,
112 // derived class can reimplement it in a more optimized way.
113 dst = this->derived() * dst;
114 }
EIGEN_DEVICE_FUNC Derived & derived()
Definition EigenBase.h:45

References Eigen::EigenBase< Derived >::derived().

+ Here is the call graph for this function:

◆ applyThisOnTheRight()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::applyThisOnTheRight ( Dest &  dst) const
inlineinherited
101 {
102 // This is the default implementation,
103 // derived class can reimplement it in a more optimized way.
104 dst = dst * this->derived();
105 }

References Eigen::EigenBase< Derived >::derived().

+ Here is the call graph for this function:

◆ check_coordinates()

void Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::check_coordinates ( Index  row,
Index  col 
) const
inlineprotectedinherited
127 {
130 eigen_assert(col>=0 && col<cols() && row>=0 && row<rows());
131 const int mode = int(Mode) & ~SelfAdjoint;
133 eigen_assert((mode==Upper && col>=row)
134 || (mode==Lower && col<=row)
135 || ((mode==StrictlyUpper || mode==UnitUpper) && col>row)
136 || ((mode==StrictlyLower || mode==UnitLower) && col<row));
137 }
EIGEN_DEVICE_FUNC RowXpr row(Index i)
This is the const version of row(). *‍/.
Definition BlockMethods.h:859
EIGEN_DEVICE_FUNC ColXpr col(Index i)
This is the const version of col().
Definition BlockMethods.h:838
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
Definition Macros.h:591
#define eigen_assert(x)
Definition Macros.h:579
EIGEN_DEVICE_FUNC Index rows() const
Definition TriangularMatrix.h:59
EIGEN_DEVICE_FUNC Index cols() const
Definition TriangularMatrix.h:61
IGL_INLINE void mode(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &X, const int d, Eigen::Matrix< T, Eigen::Dynamic, 1 > &M)
Definition mode.cpp:14

◆ check_coordinates_internal()

void Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::check_coordinates_internal ( Index  ,
Index   
) const
inlineprotectedinherited
145{}

◆ coeff()

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC Scalar Eigen::SelfAdjointView< _MatrixType, UpLo >::coeff ( Index  row,
Index  col 
) const
inline
See also
MatrixBase::coeff()
Warning
the coordinates must fit into the referenced triangular part
92 {
94 return m_matrix.coeff(row, col);
95 }
void check_coordinates_internal(Index, Index) const
Definition TriangularMatrix.h:145

References Eigen::TriangularBase< Derived >::check_coordinates_internal(), col(), Eigen::SelfAdjointView< _MatrixType, UpLo >::m_matrix, and row().

+ Here is the call graph for this function:

◆ coeffRef()

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC Scalar & Eigen::SelfAdjointView< _MatrixType, UpLo >::coeffRef ( Index  row,
Index  col 
)
inline
See also
MatrixBase::coeffRef()
Warning
the coordinates must fit into the referenced triangular part
102 {
103 EIGEN_STATIC_ASSERT_LVALUE(SelfAdjointView);
105 return m_matrix.coeffRef(row, col);
106 }
#define EIGEN_STATIC_ASSERT_LVALUE(Derived)
Definition StaticAssert.h:199

References Eigen::TriangularBase< Derived >::check_coordinates_internal(), col(), EIGEN_STATIC_ASSERT_LVALUE, Eigen::SelfAdjointView< _MatrixType, UpLo >::m_matrix, and row().

+ Here is the call graph for this function:

◆ cols()

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC Index Eigen::SelfAdjointView< _MatrixType, UpLo >::cols ( ) const
inline

◆ conjugate()

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC const ConjugateReturnType Eigen::SelfAdjointView< _MatrixType, UpLo >::conjugate ( ) const
inline
See also
MatrixBase::conjugate() const
198 { return ConjugateReturnType(m_matrix.conjugate()); }
SelfAdjointView< const MatrixConjugateReturnType, UpLo > ConjugateReturnType
Definition SelfAdjointView.h:194

References Eigen::SelfAdjointView< _MatrixType, UpLo >::m_matrix.

◆ const_cast_derived()

template<typename Derived >
EIGEN_DEVICE_FUNC Derived & Eigen::EigenBase< Derived >::const_cast_derived ( ) const
inlineinherited
52 { return *static_cast<Derived*>(const_cast<EigenBase*>(this)); }

Referenced by Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::swap().

+ Here is the caller graph for this function:

◆ const_derived()

template<typename Derived >
EIGEN_DEVICE_FUNC const Derived & Eigen::EigenBase< Derived >::const_derived ( ) const
inlineinherited
55 { return *static_cast<const Derived*>(this); }

◆ copyCoeff()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::copyCoeff ( Index  row,
Index  col,
Other &  other 
)
inlineinherited
See also
MatrixBase::copyCoeff(row,col)
85 {
86 derived().coeffRef(row, col) = other.coeff(row, col);
87 }
EIGEN_DEVICE_FUNC const SelfAdjointView< _MatrixType, UpLo > & derived() const
Definition TriangularMatrix.h:104

◆ derived() [1/2]

EIGEN_DEVICE_FUNC SelfAdjointView< _MatrixType, UpLo > & Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::derived ( )
inlineinherited
106{ return *static_cast<Derived*>(this); }

◆ derived() [2/2]

EIGEN_DEVICE_FUNC const SelfAdjointView< _MatrixType, UpLo > & Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::derived ( ) const
inlineinherited
104{ return *static_cast<const Derived*>(this); }

◆ diagonal()

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC MatrixType::ConstDiagonalReturnType Eigen::SelfAdjointView< _MatrixType, UpLo >::diagonal ( ) const
inline
Returns
a const expression of the main diagonal of the matrix *this

This method simply returns the diagonal of the nested expression, thus by-passing the SelfAdjointView decorator.

See also
MatrixBase::diagonal(), class Diagonal
231 {
232 return typename MatrixType::ConstDiagonalReturnType(m_matrix);
233 }

References Eigen::SelfAdjointView< _MatrixType, UpLo >::m_matrix.

◆ eigenvalues()

template<typename MatrixType , unsigned int UpLo>
SelfAdjointView< MatrixType, UpLo >::EigenvaluesReturnType Eigen::SelfAdjointView< MatrixType, UpLo >::eigenvalues
inline

Computes the eigenvalues of a matrix.

Returns
Column vector containing the eigenvalues.

\eigenvalues_module 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:

Output:

See also
SelfAdjointEigenSolver::eigenvalues(), MatrixBase::eigenvalues()
89{
90 PlainObject thisAsMatrix(*this);
91 return SelfAdjointEigenSolver<PlainObject>(thisAsMatrix, false).eigenvalues();
92}
MatrixType::PlainObject PlainObject
Definition SelfAdjointView.h:70

References Eigen::SelfAdjointEigenSolver< _MatrixType >::eigenvalues().

+ Here is the call graph for this function:

◆ evalTo() [1/3]

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::evalTo ( Dest &  dst) const
inlineinherited
72 { derived().evalTo(dst); }

Referenced by Eigen::EigenBase< Derived >::subTo().

+ Here is the caller graph for this function:

◆ evalTo() [2/3]

EIGEN_DEVICE_FUNC void Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::evalTo ( MatrixBase< DenseDerived > &  other) const
inherited

◆ evalTo() [3/3]

void Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::evalTo ( MatrixBase< DenseDerived > &  other) const
inherited

Assigns a triangular or selfadjoint matrix to a dense matrix. If the matrix is triangular, the opposite part is set to zero.

602{
603 evalToLazy(other.derived());
604}
EIGEN_DEVICE_FUNC void evalToLazy(MatrixBase< DenseDerived > &other) const

◆ evalToLazy() [1/2]

EIGEN_DEVICE_FUNC void Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::evalToLazy ( MatrixBase< DenseDerived > &  other) const
inherited

◆ evalToLazy() [2/2]

void Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::evalToLazy ( MatrixBase< DenseDerived > &  other) const
inherited

Assigns a triangular or selfadjoint matrix to a dense matrix. If the matrix is triangular, the opposite part is set to zero.

934{
935 other.derived().resize(this->rows(), this->cols());
936 internal::call_triangular_assignment_loop<Derived::Mode,(Derived::Mode&SelfAdjoint)==0 /* SetOpposite */>(other.derived(), derived().nestedExpression());
937}
@ SelfAdjoint
Definition Constants.h:220

◆ innerStride()

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC Index Eigen::SelfAdjointView< _MatrixType, UpLo >::innerStride ( ) const
inline
85{ return m_matrix.innerStride(); }

References Eigen::SelfAdjointView< _MatrixType, UpLo >::m_matrix.

◆ ldlt()

template<typename MatrixType , unsigned int UpLo>
const LDLT< typename SelfAdjointView< MatrixType, UpLo >::PlainObject, UpLo > Eigen::SelfAdjointView< MatrixType, UpLo >::ldlt
inline

\cholesky_module

Returns
the Cholesky decomposition with full pivoting without square root of *this
See also
MatrixBase::ldlt()
656{
657 return LDLT<PlainObject,UpLo>(m_matrix);
658}

◆ llt()

template<typename MatrixType , unsigned int UpLo>
const LLT< typename SelfAdjointView< MatrixType, UpLo >::PlainObject, UpLo > Eigen::SelfAdjointView< MatrixType, UpLo >::llt
inline

\cholesky_module

Returns
the LLT decomposition of *this
See also
SelfAdjointView::llt()
536{
537 return LLT<PlainObject,UpLo>(m_matrix);
538}

◆ nestedExpression() [1/2]

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC MatrixTypeNestedCleaned & Eigen::SelfAdjointView< _MatrixType, UpLo >::nestedExpression ( )
inline

◆ nestedExpression() [2/2]

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC const MatrixTypeNestedCleaned & Eigen::SelfAdjointView< _MatrixType, UpLo >::nestedExpression ( ) const
inline

◆ operator()() [1/2]

EIGEN_DEVICE_FUNC Scalar & Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::operator() ( Index  row,
Index  col 
)
inlineinherited
97 {
99 return coeffRef(row,col);
100 }
EIGEN_DEVICE_FUNC Scalar & coeffRef(Index row, Index col)
Definition TriangularMatrix.h:78
void check_coordinates(Index row, Index col) const
Definition TriangularMatrix.h:126

◆ operator()() [2/2]

EIGEN_DEVICE_FUNC Scalar Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::operator() ( Index  row,
Index  col 
) const
inlineinherited
91 {
93 return coeff(row,col);
94 }
EIGEN_DEVICE_FUNC Scalar coeff(Index row, Index col) const
Definition TriangularMatrix.h:76

◆ operator*()

template<typename _MatrixType , unsigned int UpLo>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC const Product< SelfAdjointView, OtherDerived > Eigen::SelfAdjointView< _MatrixType, UpLo >::operator* ( const MatrixBase< OtherDerived > &  rhs) const
inline

Efficient triangular matrix times vector/matrix product

122 {
123 return Product<SelfAdjointView,OtherDerived>(*this, rhs.derived());
124 }

◆ operatorNorm()

template<typename MatrixType , unsigned int UpLo>
SelfAdjointView< MatrixType, UpLo >::RealScalar Eigen::SelfAdjointView< MatrixType, UpLo >::operatorNorm
inline

Computes the L2 operator norm.

Returns
Operator norm of the matrix.

\eigenvalues_module 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:

Output:

See also
eigenvalues(), MatrixBase::operatorNorm()
152{
153 return eigenvalues().cwiseAbs().maxCoeff();
154}
EIGEN_DEVICE_FUNC EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
Definition MatrixBaseEigenvalues.h:88

◆ outerStride()

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC Index Eigen::SelfAdjointView< _MatrixType, UpLo >::outerStride ( ) const
inline
83{ return m_matrix.outerStride(); }

References Eigen::SelfAdjointView< _MatrixType, UpLo >::m_matrix.

◆ rankUpdate() [1/4]

template<typename _MatrixType , unsigned int UpLo>
template<typename DerivedU , typename DerivedV >
SelfAdjointView< MatrixType, UpLo > & Eigen::SelfAdjointView< _MatrixType, UpLo >::rankUpdate ( const MatrixBase< DerivedU > &  u,
const MatrixBase< DerivedV > &  v,
const Scalar alpha 
)
62{
63 typedef internal::blas_traits<DerivedU> UBlasTraits;
64 typedef typename UBlasTraits::DirectLinearAccessType ActualUType;
65 typedef typename internal::remove_all<ActualUType>::type _ActualUType;
66 typename internal::add_const_on_value_type<ActualUType>::type actualU = UBlasTraits::extract(u.derived());
67
68 typedef internal::blas_traits<DerivedV> VBlasTraits;
69 typedef typename VBlasTraits::DirectLinearAccessType ActualVType;
70 typedef typename internal::remove_all<ActualVType>::type _ActualVType;
71 typename internal::add_const_on_value_type<ActualVType>::type actualV = VBlasTraits::extract(v.derived());
72
73 // If MatrixType is row major, then we use the routine for lower triangular in the upper triangular case and
74 // vice versa, and take the complex conjugate of all coefficients and vector entries.
75
76 enum { IsRowMajor = (internal::traits<MatrixType>::Flags&RowMajorBit) ? 1 : 0 };
77 Scalar actualAlpha = alpha * UBlasTraits::extractScalarFactor(u.derived())
78 * numext::conj(VBlasTraits::extractScalarFactor(v.derived()));
79 if (IsRowMajor)
80 actualAlpha = numext::conj(actualAlpha);
81
82 typedef typename internal::remove_all<typename internal::conj_expr_if<IsRowMajor ^ UBlasTraits::NeedToConjugate,_ActualUType>::type>::type UType;
83 typedef typename internal::remove_all<typename internal::conj_expr_if<IsRowMajor ^ VBlasTraits::NeedToConjugate,_ActualVType>::type>::type VType;
84 internal::selfadjoint_rank2_update_selector<Scalar, Index, UType, VType,
85 (IsRowMajor ? int(UpLo==Upper ? Lower : Upper) : UpLo)>
86 ::run(_expression().const_cast_derived().data(),_expression().outerStride(),UType(actualU),VType(actualV),actualAlpha);
87
88 return *this;
89}
EIGEN_DEVICE_FUNC Index outerStride() const
Definition SelfAdjointView.h:83
EIGEN_DEVICE_FUNC const MatrixTypeNestedCleaned & _expression() const
Definition SelfAdjointView.h:110
internal::traits< SelfAdjointView >::Scalar Scalar
The type of coefficients in this matrix.
Definition SelfAdjointView.h:61
const unsigned int RowMajorBit
Definition Constants.h:61
T type
Definition Meta.h:78
const T type
Definition Meta.h:140
constexpr auto data(C &c) -> decltype(c.data())
Definition span.hpp:195
EIGEN_DEVICE_FUNC Derived & const_cast_derived() const
Definition EigenBase.h:51
Eigen::Index Index
The interface type of indices.
Definition EigenBase.h:38

References Eigen::Lower, Eigen::RowMajorBit, and Eigen::Upper.

◆ rankUpdate() [2/4]

template<typename _MatrixType , unsigned int UpLo>
template<typename DerivedU , typename DerivedV >
EIGEN_DEVICE_FUNC 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^* $

Returns
a reference to *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.

See also
rankUpdate(const MatrixBase<DerivedU>&, Scalar)

◆ rankUpdate() [3/4]

template<typename _MatrixType , unsigned int UpLo>
template<typename DerivedU >
SelfAdjointView< MatrixType, UpLo > & Eigen::SelfAdjointView< _MatrixType, UpLo >::rankUpdate ( const MatrixBase< DerivedU > &  u,
const Scalar alpha 
)
125{
126 selfadjoint_product_selector<MatrixType,DerivedU,UpLo>::run(_expression().const_cast_derived(), u.derived(), alpha);
127
128 return *this;
129}

◆ rankUpdate() [4/4]

template<typename _MatrixType , unsigned int UpLo>
template<typename DerivedU >
EIGEN_DEVICE_FUNC 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.

Returns
a reference to *this

Note that to perform $ this = this + \alpha ( u^* u ) $ you can simply call this function with u.adjoint().

See also
rankUpdate(const MatrixBase<DerivedU>&, const MatrixBase<DerivedV>&, Scalar)

◆ resize()

void Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::resize ( Index  rows,
Index  cols 
)
inlineinherited
69 {
72 eigen_assert(rows==this->rows() && cols==this->cols());
73 }
#define EIGEN_UNUSED_VARIABLE(var)
Definition Macros.h:618

◆ rows()

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC Index Eigen::SelfAdjointView< _MatrixType, UpLo >::rows ( ) const
inline

◆ size()

template<typename Derived >
EIGEN_DEVICE_FUNC Index Eigen::EigenBase< Derived >::size ( ) const
inlineinherited
Returns
the number of coefficients, which is rows()*cols().
See also
rows(), cols(), SizeAtCompileTime.
66{ return rows() * cols(); }

References Eigen::EigenBase< Derived >::cols(), and Eigen::EigenBase< Derived >::rows().

Referenced by Eigen::PlainObjectBase< Derived >::_resize_to_match(), Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::resize(), Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity(), and Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ subTo()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::subTo ( Dest &  dst) const
inlineinherited
90 {
91 // This is the default implementation,
92 // derived class can reimplement it in a more optimized way.
93 typename Dest::PlainObject res(rows(),cols());
94 evalTo(res);
95 dst -= res;
96 }

References Eigen::EigenBase< Derived >::cols(), Eigen::EigenBase< Derived >::evalTo(), and Eigen::EigenBase< Derived >::rows().

+ Here is the call graph for this function:

◆ toDenseMatrix()

EIGEN_DEVICE_FUNC DenseMatrixType Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::toDenseMatrix ( ) const
inlineinherited
118 {
119 DenseMatrixType res(rows(), cols());
120 evalToLazy(res);
121 return res;
122 }
internal::traits< SelfAdjointView< _MatrixType, UpLo > >::FullMatrixType DenseMatrixType
Definition TriangularMatrix.h:51

◆ transpose() [1/2]

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC TransposeReturnType Eigen::SelfAdjointView< _MatrixType, UpLo >::transpose ( )
inline
See also
MatrixBase::transpose()
210 {
212 typename MatrixType::TransposeReturnType tmp(m_matrix);
213 return TransposeReturnType(tmp);
214 }
SelfAdjointView< typename MatrixType::TransposeReturnType, TransposeMode > TransposeReturnType
Definition SelfAdjointView.h:206
_MatrixType MatrixType
Definition SelfAdjointView.h:54

References EIGEN_STATIC_ASSERT_LVALUE, and Eigen::SelfAdjointView< _MatrixType, UpLo >::m_matrix.

◆ transpose() [2/2]

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC const ConstTransposeReturnType Eigen::SelfAdjointView< _MatrixType, UpLo >::transpose ( ) const
inline
See also
MatrixBase::transpose() const
220 {
221 return ConstTransposeReturnType(m_matrix.transpose());
222 }
SelfAdjointView< const typename MatrixType::ConstTransposeReturnType, TransposeMode > ConstTransposeReturnType
Definition SelfAdjointView.h:216

References Eigen::SelfAdjointView< _MatrixType, UpLo >::m_matrix.

◆ triangularView()

template<typename _MatrixType , unsigned int UpLo>
template<unsigned int TriMode>
EIGEN_DEVICE_FUNC internal::conditional<(TriMode &(Upper|Lower))==(UpLo &(Upper|Lower)), TriangularView< MatrixType, TriMode >, TriangularView< typenameMatrixType::AdjointReturnType, TriMode > >::type Eigen::SelfAdjointView< _MatrixType, UpLo >::triangularView ( ) const
inline
Returns
an expression of a triangular view extracted from the current selfadjoint view of a given triangular part

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.

See also
MatrixBase::triangularView(), class TriangularView
186 {
187 typename internal::conditional<(TriMode&(Upper|Lower))==(UpLo&(Upper|Lower)), MatrixType&, typename MatrixType::ConstTransposeReturnType>::type tmp1(m_matrix);
188 typename internal::conditional<(TriMode&(Upper|Lower))==(UpLo&(Upper|Lower)), MatrixType&, typename MatrixType::AdjointReturnType>::type tmp2(tmp1);
189 return typename internal::conditional<(TriMode&(Upper|Lower))==(UpLo&(Upper|Lower)),
190 TriangularView<MatrixType,TriMode>,
191 TriangularView<typename MatrixType::AdjointReturnType,TriMode> >::type(tmp2);
192 }

References Eigen::Lower, Eigen::SelfAdjointView< _MatrixType, UpLo >::m_matrix, and Eigen::Upper.

Friends And Related Symbol Documentation

◆ operator* [1/2]

template<typename _MatrixType , unsigned int UpLo>
template<typename OtherDerived >
EIGEN_DEVICE_FUNC const Product< OtherDerived, SelfAdjointView > operator* ( const MatrixBase< OtherDerived > &  lhs,
const SelfAdjointView< _MatrixType, UpLo > &  rhs 
)
friend

Efficient vector/matrix times triangular matrix product

131 {
132 return Product<OtherDerived,SelfAdjointView>(lhs.derived(),rhs);
133 }

◆ operator* [2/2]

template<typename _MatrixType , unsigned int UpLo>
EIGEN_DEVICE_FUNC const SelfAdjointView< const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(Scalar, MatrixType, product), UpLo > operator* ( const Scalar s,
const SelfAdjointView< _MatrixType, UpLo > &  mat 
)
friend
138 {
139 return (s*mat.nestedExpression()).template selfadjointView<UpLo>();
140 }

Member Data Documentation

◆ m_matrix


The documentation for this class was generated from the following files: