Main MRPT website > C++ reference
MRPT logo
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
Eigen::SelfAdjointView< MatrixType, UpLo > Class Template Reference

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()

Definition at line 67 of file Core.

Inheritance diagram for Eigen::SelfAdjointView< MatrixType, UpLo >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { Mode = internal::traits<SelfAdjointView>::Mode }
typedef TriangularBase
< SelfAdjointView
Base
typedef internal::traits
< SelfAdjointView >
::MatrixTypeNested 
MatrixTypeNested
typedef internal::traits
< SelfAdjointView >
::MatrixTypeNestedCleaned 
MatrixTypeNestedCleaned
typedef internal::traits
< SelfAdjointView >::Scalar 
Scalar
 The type of coefficients in this matrix.
typedef MatrixType::Index Index
typedef MatrixType::PlainObject PlainObject
typedef NumTraits< Scalar >::Real RealScalar
 Real part of Scalar.
typedef Matrix< RealScalar,
internal::traits< MatrixType >
::ColsAtCompileTime, 1 > 
EigenvaluesReturnType
 Return type of eigenvalues()
enum  
typedef internal::traits
< SelfAdjointView< MatrixType,
UpLo > >::StorageKind 
StorageKind
typedef internal::traits
< SelfAdjointView< MatrixType,
UpLo > >::DenseMatrixType 
DenseMatrixType
typedef DenseMatrixType DenseType

Public Member Functions

 SelfAdjointView (const MatrixType &matrix)
Index rows () const
Index cols () const
Index outerStride () const
Index innerStride () const
Scalar coeff (Index row, Index col) const
ScalarcoeffRef (Index row, Index col)
const MatrixTypeNestedCleaned_expression () const
const MatrixTypeNestedCleanednestedExpression () const
MatrixTypeNestedCleanednestedExpression ()
template<typename OtherDerived >
SelfadjointProductMatrix
< MatrixType, Mode, false,
OtherDerived,
0, OtherDerived::IsVectorAtCompileTime > 
operator* (const MatrixBase< OtherDerived > &rhs) const
 Efficient self-adjoint matrix times vector/matrix product.
template<typename DerivedU , typename DerivedV >
SelfAdjointViewrankUpdate (const MatrixBase< DerivedU > &u, const MatrixBase< DerivedV > &v, Scalar alpha=Scalar(1))
 Perform a symmetric rank 2 update of the selfadjoint matrix *this: $ this = this + \alpha u v^* + conj(\alpha) v u^* $.
template<typename DerivedU >
SelfAdjointViewrankUpdate (const MatrixBase< DerivedU > &u, 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.
const LLT< PlainObject, UpLo > llt () const
 
const LDLT< PlainObject, UpLo > ldlt () const
 
EigenvaluesReturnType eigenvalues () const
 Computes the eigenvalues of a matrix.
RealScalar operatorNorm () const
 Computes the L2 operator norm.
Scalar coeff (Index row, Index col) const
ScalarcoeffRef (Index row, Index col)
EIGEN_STRONG_INLINE void copyCoeff (Index row, Index col, Other &other)
Scalar operator() (Index row, Index col) const
Scalaroperator() (Index row, Index col)
void evalTo (MatrixBase< DenseDerived > &other) const
void evalTo (Dest &dst) const
void evalToLazy (MatrixBase< DenseDerived > &other) const
DenseMatrixType toDenseMatrix () const
SelfAdjointView< MatrixType,
UpLo > & 
derived ()
const SelfAdjointView
< MatrixType, UpLo > & 
derived () const
SelfAdjointView< MatrixType,
UpLo > & 
const_cast_derived () const
const SelfAdjointView
< MatrixType, UpLo > & 
const_derived () const
Index size () const
void addTo (Dest &dst) const
void subTo (Dest &dst) const
void applyThisOnTheRight (Dest &dst) const
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

const MatrixTypeNested m_matrix

Friends

template<typename OtherDerived >
SelfadjointProductMatrix
< OtherDerived,
0, OtherDerived::IsVectorAtCompileTime,
MatrixType, Mode, false > 
operator* (const MatrixBase< OtherDerived > &lhs, const SelfAdjointView &rhs)
 Efficient vector/matrix times self-adjoint matrix product.

Member Typedef Documentation

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

Definition at line 72 of file Core.

typedef internal::traits<SelfAdjointView< MatrixType, UpLo > >::DenseMatrixType Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >::DenseMatrixType [inherited]

Definition at line 58 of file Core.

typedef DenseMatrixType Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >::DenseType [inherited]

Definition at line 59 of file Core.

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

Return type of eigenvalues()

Definition at line 174 of file Core.

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

Reimplemented from Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >.

Definition at line 79 of file Core.

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

Definition at line 73 of file Core.

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

Definition at line 74 of file Core.

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

Definition at line 84 of file Core.

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

Real part of Scalar.

Definition at line 172 of file Core.

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

The type of coefficients in this matrix.

Reimplemented from Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >.

Definition at line 77 of file Core.

typedef internal::traits<SelfAdjointView< MatrixType, UpLo > >::StorageKind Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >::StorageKind [inherited]

Reimplemented from Eigen::EigenBase< SelfAdjointView< MatrixType, UpLo > >.

Definition at line 56 of file Core.


Member Enumeration Documentation

anonymous enum [inherited]

Definition at line 47 of file Core.

template<typename MatrixType, unsigned int UpLo>
anonymous enum
Enumerator:
Mode 

Definition at line 81 of file Core.


Constructor & Destructor Documentation

template<typename MatrixType, unsigned int UpLo>
Eigen::SelfAdjointView< MatrixType, UpLo >::SelfAdjointView ( const MatrixType &  matrix) [inline]

Definition at line 86 of file Core.


Member Function Documentation

template<typename MatrixType, unsigned int UpLo>
const MatrixTypeNestedCleaned& Eigen::SelfAdjointView< MatrixType, UpLo >::_expression ( ) const [inline]

Definition at line 113 of file Core.

void Eigen::EigenBase< SelfAdjointView< MatrixType, UpLo > >::addTo ( Dest &  dst) const [inline, inherited]

Definition at line 71 of file Core.

void Eigen::EigenBase< SelfAdjointView< MatrixType, UpLo > >::applyThisOnTheLeft ( Dest &  dst) const [inline, inherited]

Definition at line 99 of file Core.

void Eigen::EigenBase< SelfAdjointView< MatrixType, UpLo > >::applyThisOnTheRight ( Dest &  dst) const [inline, inherited]

Definition at line 91 of file Core.

void Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >::check_coordinates ( Index  row,
Index  col 
) const [inline, protected, inherited]

Definition at line 109 of file Core.

void Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >::check_coordinates_internal ( Index  ,
Index   
) const [inline, protected, inherited]

Definition at line 128 of file Core.

Scalar Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >::coeff ( Index  row,
Index  col 
) const [inline, inherited]

Definition at line 68 of file Core.

template<typename MatrixType, unsigned int UpLo>
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

Definition at line 97 of file Core.

Scalar& Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >::coeffRef ( Index  row,
Index  col 
) [inline, inherited]

Definition at line 69 of file Core.

template<typename MatrixType, unsigned int UpLo>
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

Definition at line 106 of file Core.

template<typename MatrixType, unsigned int UpLo>
Index Eigen::SelfAdjointView< MatrixType, UpLo >::cols ( void  ) const [inline]
Returns:
the number of columns.
See also:
rows(), ColsAtCompileTime

Reimplemented from Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >.

Definition at line 90 of file Core.

SelfAdjointView< MatrixType, UpLo > & Eigen::EigenBase< SelfAdjointView< MatrixType, UpLo > >::const_cast_derived ( ) const [inline, inherited]

Definition at line 53 of file Core.

const SelfAdjointView< MatrixType, UpLo > & Eigen::EigenBase< SelfAdjointView< MatrixType, UpLo > >::const_derived ( ) const [inline, inherited]

Definition at line 55 of file Core.

EIGEN_STRONG_INLINE void Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >::copyCoeff ( Index  row,
Index  col,
Other &  other 
) [inline, inherited]
See also:
MatrixBase::copyCoeff(row,col)

Definition at line 74 of file Core.

const SelfAdjointView< MatrixType, UpLo > & Eigen::EigenBase< SelfAdjointView< MatrixType, UpLo > >::derived ( ) const [inline, inherited]
Returns:
a const reference to the derived object

Definition at line 51 of file Core.

SelfAdjointView< MatrixType, UpLo > & Eigen::EigenBase< SelfAdjointView< MatrixType, UpLo > >::derived ( ) [inline, inherited]
Returns:
a reference to the derived object

Definition at line 49 of file Core.

template<typename MatrixType , unsigned int UpLo>
SelfAdjointView< MatrixType, UpLo >::EigenvaluesReturnType Eigen::SelfAdjointView< MatrixType, UpLo >::eigenvalues ( ) const [inline]

Computes the eigenvalues of a matrix.

Returns:
Column vector containing the 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:

Output:

See also:
SelfAdjointEigenSolver::eigenvalues(), MatrixBase::eigenvalues()

Definition at line 103 of file Eigenvalues.

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.

void Eigen::EigenBase< SelfAdjointView< MatrixType, UpLo > >::evalTo ( Dest &  dst) const [inline, inherited]

Definition at line 67 of file Core.

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.

template<typename MatrixType, unsigned int UpLo>
Index Eigen::SelfAdjointView< MatrixType, UpLo >::innerStride ( ) const [inline]

Reimplemented from Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >.

Definition at line 92 of file Core.

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

Returns:
the Cholesky decomposition with full pivoting without square root of *this

Definition at line 447 of file Cholesky.

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

Returns:
the LLT decomposition of *this

Definition at line 382 of file Cholesky.

template<typename MatrixType, unsigned int UpLo>
const MatrixTypeNestedCleaned& Eigen::SelfAdjointView< MatrixType, UpLo >::nestedExpression ( ) const [inline]

Definition at line 115 of file Core.

template<typename MatrixType, unsigned int UpLo>
MatrixTypeNestedCleaned& Eigen::SelfAdjointView< MatrixType, UpLo >::nestedExpression ( ) [inline]

Definition at line 116 of file Core.

Scalar Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >::operator() ( Index  row,
Index  col 
) const [inline, inherited]

Definition at line 79 of file Core.

Scalar& Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >::operator() ( Index  row,
Index  col 
) [inline, inherited]

Definition at line 84 of file Core.

template<typename MatrixType, unsigned int UpLo>
template<typename OtherDerived >
SelfadjointProductMatrix<MatrixType,Mode,false,OtherDerived,0,OtherDerived::IsVectorAtCompileTime> Eigen::SelfAdjointView< MatrixType, UpLo >::operator* ( const MatrixBase< OtherDerived > &  rhs) const [inline]

Efficient self-adjoint matrix times vector/matrix product.

Definition at line 121 of file Core.

template<typename MatrixType , unsigned int UpLo>
SelfAdjointView< MatrixType, UpLo >::RealScalar Eigen::SelfAdjointView< MatrixType, UpLo >::operatorNorm ( ) const [inline]

Computes the L2 operator norm.

Returns:
Operator norm of the matrix.

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()

Definition at line 166 of file Eigenvalues.

template<typename MatrixType, unsigned int UpLo>
Index Eigen::SelfAdjointView< MatrixType, UpLo >::outerStride ( ) const [inline]

Reimplemented from Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >.

Definition at line 91 of file Core.

template<typename MatrixType , unsigned int UpLo>
template<typename DerivedU >
SelfAdjointView< MatrixType, UpLo > & Eigen::SelfAdjointView< MatrixType, UpLo >::rankUpdate ( const MatrixBase< DerivedU > &  u,
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)

Definition at line 130 of file Core.

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,
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)

Definition at line 75 of file Core.

template<typename MatrixType, unsigned int UpLo>
Index Eigen::SelfAdjointView< MatrixType, UpLo >::rows ( void  ) const [inline]
Returns:
the number of rows.
See also:
cols(), RowsAtCompileTime

Reimplemented from Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >.

Definition at line 89 of file Core.

Index Eigen::EigenBase< SelfAdjointView< MatrixType, UpLo > >::size ( ) const [inline, inherited]
Returns:
the number of coefficients, which is rows()*cols().
See also:
rows(), cols(), SizeAtCompileTime.

Definition at line 64 of file Core.

void Eigen::EigenBase< SelfAdjointView< MatrixType, UpLo > >::subTo ( Dest &  dst) const [inline, inherited]

Definition at line 81 of file Core.

DenseMatrixType Eigen::TriangularBase< SelfAdjointView< MatrixType, UpLo > >::toDenseMatrix ( ) const [inline, inherited]

Definition at line 100 of file Core.


Friends And Related Function Documentation

template<typename MatrixType, unsigned int UpLo>
template<typename OtherDerived >
SelfadjointProductMatrix<OtherDerived,0,OtherDerived::IsVectorAtCompileTime,MatrixType,Mode,false> operator* ( const MatrixBase< OtherDerived > &  lhs,
const SelfAdjointView< MatrixType, UpLo > &  rhs 
) [friend]

Efficient vector/matrix times self-adjoint matrix product.

Definition at line 131 of file Core.


Member Data Documentation

template<typename MatrixType, unsigned int UpLo>
const MatrixTypeNested Eigen::SelfAdjointView< MatrixType, UpLo >::m_matrix [protected]

Definition at line 203 of file Core.




Page generated by Doxygen 1.7.4 for MRPT 0.9.5 SVN:2717 at Sun Oct 16 16:08:03 PDT 2011 Hosted on:
SourceForge.net Logo