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.
Definition at line 65 of file SelfAdjointView.h.
#include <src/Core/SelfAdjointView.h>
Public Types | |
enum | { Mode = internal::traits<SelfAdjointView>::Mode } |
typedef TriangularBase < SelfAdjointView > | Base |
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(). | |
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 |
Scalar & | coeffRef (Index row, Index col) |
const MatrixType & | _expression () const |
const MatrixType & | nestedExpression () const |
MatrixType & | nestedExpression () |
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 > | |
SelfAdjointView & | rankUpdate (const MatrixBase< DerivedU > &u, const MatrixBase< DerivedV > &v, Scalar alpha=Scalar(1)) |
Perform a symmetric rank 2 update of the selfadjoint matrix *this : ![]() | |
template<typename DerivedU > | |
SelfAdjointView & | rankUpdate (const MatrixBase< DerivedU > &u, Scalar alpha=Scalar(1)) |
Perform a symmetric rank K update of the selfadjoint matrix *this : ![]() | |
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. | |
Protected Attributes | |
const MatrixType::Nested | 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. |
typedef TriangularBase<SelfAdjointView> SelfAdjointView< MatrixType, UpLo >::Base |
Definition at line 70 of file SelfAdjointView.h.
typedef Matrix<RealScalar, internal::traits<MatrixType>::ColsAtCompileTime, 1> SelfAdjointView< MatrixType, UpLo >::EigenvaluesReturnType |
Return type of eigenvalues().
Definition at line 170 of file SelfAdjointView.h.
typedef MatrixType::Index SelfAdjointView< MatrixType, UpLo >::Index |
Reimplemented from TriangularBase< SelfAdjointView< MatrixType, UpLo > >.
Definition at line 75 of file SelfAdjointView.h.
typedef MatrixType::PlainObject SelfAdjointView< MatrixType, UpLo >::PlainObject |
Definition at line 80 of file SelfAdjointView.h.
typedef NumTraits<Scalar>::Real SelfAdjointView< MatrixType, UpLo >::RealScalar |
Real part of Scalar.
Definition at line 168 of file SelfAdjointView.h.
typedef internal::traits<SelfAdjointView>::Scalar SelfAdjointView< MatrixType, UpLo >::Scalar |
The type of coefficients in this matrix.
Reimplemented from TriangularBase< SelfAdjointView< MatrixType, UpLo > >.
Definition at line 73 of file SelfAdjointView.h.
anonymous enum |
Definition at line 77 of file SelfAdjointView.h.
SelfAdjointView< MatrixType, UpLo >::SelfAdjointView | ( | const MatrixType & | matrix | ) | [inline] |
Definition at line 82 of file SelfAdjointView.h.
const MatrixType& SelfAdjointView< MatrixType, UpLo >::_expression | ( | ) | const [inline] |
Definition at line 109 of file SelfAdjointView.h.
Scalar SelfAdjointView< MatrixType, UpLo >::coeff | ( | Index | row, | |
Index | col | |||
) | const [inline] |
Definition at line 93 of file SelfAdjointView.h.
Scalar& SelfAdjointView< MatrixType, UpLo >::coeffRef | ( | Index | row, | |
Index | col | |||
) | [inline] |
Definition at line 102 of file SelfAdjointView.h.
Index SelfAdjointView< MatrixType, UpLo >::cols | ( | void | ) | const [inline] |
Reimplemented from TriangularBase< SelfAdjointView< MatrixType, UpLo > >.
Definition at line 86 of file SelfAdjointView.h.
SelfAdjointView< MatrixType, UpLo >::EigenvaluesReturnType SelfAdjointView< MatrixType, UpLo >::eigenvalues | ( | ) | const [inline] |
Computes the eigenvalues of a matrix.
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:
Definition at line 102 of file MatrixBaseEigenvalues.h.
Referenced by SelfAdjointView< MatrixType, UpLo >::operatorNorm().
Index SelfAdjointView< MatrixType, UpLo >::innerStride | ( | ) | const [inline] |
Reimplemented from TriangularBase< SelfAdjointView< MatrixType, UpLo > >.
Definition at line 88 of file SelfAdjointView.h.
const LDLT< typename SelfAdjointView< MatrixType, UpLo >::PlainObject, UpLo > SelfAdjointView< MatrixType, UpLo >::ldlt | ( | ) | const [inline] |
*this
Definition at line 430 of file LDLT.h.
References SelfAdjointView< MatrixType, UpLo >::m_matrix.
const LLT< typename SelfAdjointView< MatrixType, UpLo >::PlainObject, UpLo > SelfAdjointView< MatrixType, UpLo >::llt | ( | ) | const [inline] |
*this
Definition at line 368 of file LLT.h.
References SelfAdjointView< MatrixType, UpLo >::m_matrix.
const MatrixType& SelfAdjointView< MatrixType, UpLo >::nestedExpression | ( | ) | const [inline] |
Definition at line 111 of file SelfAdjointView.h.
MatrixType& SelfAdjointView< MatrixType, UpLo >::nestedExpression | ( | ) | [inline] |
Definition at line 112 of file SelfAdjointView.h.
SelfadjointProductMatrix<MatrixType,Mode,false,OtherDerived,0,OtherDerived::IsVectorAtCompileTime> SelfAdjointView< MatrixType, UpLo >::operator* | ( | const MatrixBase< OtherDerived > & | rhs | ) | const [inline] |
Efficient self-adjoint matrix times vector/matrix product.
Definition at line 117 of file SelfAdjointView.h.
SelfAdjointView< MatrixType, UpLo >::RealScalar SelfAdjointView< MatrixType, UpLo >::operatorNorm | ( | ) | const [inline] |
Computes the L2 operator norm.
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:
Definition at line 165 of file MatrixBaseEigenvalues.h.
References SelfAdjointView< MatrixType, UpLo >::eigenvalues().
Index SelfAdjointView< MatrixType, UpLo >::outerStride | ( | ) | const [inline] |
Reimplemented from TriangularBase< SelfAdjointView< MatrixType, UpLo > >.
Definition at line 87 of file SelfAdjointView.h.
SelfAdjointView< MatrixType, UpLo > & 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
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.
Definition at line 74 of file SelfadjointRank2Update.h.
References Lower, RowMajorBit, and Upper.
SelfAdjointView< MatrixType, UpLo > & SelfAdjointView< MatrixType, UpLo >::rankUpdate | ( | const MatrixBase< DerivedU > & | u, | |
Scalar | alpha = Scalar(1) | |||
) |
Perform a symmetric rank K update of the selfadjoint matrix *this
: where u is a vector or matrix.
*this
Note that to perform you can simply call this function with u.adjoint().
Definition at line 39 of file SelfadjointProduct.h.
References ColMajor, RowMajor, and RowMajorBit.
Index SelfAdjointView< MatrixType, UpLo >::rows | ( | void | ) | const [inline] |
Reimplemented from TriangularBase< SelfAdjointView< MatrixType, UpLo > >.
Definition at line 85 of file SelfAdjointView.h.
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 127 of file SelfAdjointView.h.
const MatrixType::Nested SelfAdjointView< MatrixType, UpLo >::m_matrix [protected] |
Definition at line 176 of file SelfAdjointView.h.
Referenced by SelfAdjointView< MatrixType, UpLo >::ldlt(), and SelfAdjointView< MatrixType, UpLo >::llt().
Page generated by Doxygen 1.7.1 for MRPT 0.9.4 SVN: at Mon Jan 10 23:33:19 UTC 2011 |