Main MRPT website > C++ reference
MRPT logo
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
Eigen::TriangularView Class Reference

Detailed Description

Base class for triangular part in a matrix.

Parameters:
MatrixTypethe type of the object in which we are taking the triangular part
Modethe kind of triangular matrix expression to construct. Can be Upper, Lower, UnitUpper, UnitLower, StrictlyUpper, or StrictlyLower. This is in fact a bit field; it must have either Upper or Lower, and additionnaly it may have UnitDiag or ZeroDiag or neither.

This class represents a triangular part of a matrix, not necessarily square. Strictly speaking, for rectangular matrices one should speak of "trapezoid" parts. This class is the return type of MatrixBase::triangularView() and most of the time this is the only way it is used.

See also:
MatrixBase::triangularView()
Inheritance diagram for Eigen::TriangularView:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { Mode = _Mode, TransposeMode }
typedef TriangularBase
< TriangularView
Base
typedef internal::traits
< TriangularView >::Scalar 
Scalar
typedef _MatrixType MatrixType
typedef internal::traits
< TriangularView >
::DenseMatrixType 
DenseMatrixType
typedef DenseMatrixType PlainObject
typedef internal::traits
< TriangularView >
::StorageKind 
StorageKind
typedef internal::traits
< TriangularView >::Index 
Index
enum  
typedef DenseMatrixType DenseType

Public Member Functions

 TriangularView (const MatrixType &matrix)
Index rows () const
Index cols () const
Index outerStride () const
Index innerStride () const
template<typename Other >
TriangularViewoperator+= (const DenseBase< Other > &other)
template<typename Other >
TriangularViewoperator-= (const DenseBase< Other > &other)
TriangularViewoperator*= (const typename internal::traits< MatrixType >::Scalar &other)
TriangularViewoperator/= (const typename internal::traits< MatrixType >::Scalar &other)
void fill (const Scalar &value)
TriangularViewsetConstant (const Scalar &value)
TriangularViewsetZero ()
TriangularViewsetOnes ()
Scalar coeff (Index row, Index col) const
ScalarcoeffRef (Index row, Index col)
const MatrixTypeNestedCleanednestedExpression () const
MatrixTypeNestedCleanednestedExpression ()
template<typename OtherDerived >
TriangularViewoperator= (const TriangularBase< OtherDerived > &other)
 Assigns a triangular matrix to a triangular part of a dense matrix.
template<typename OtherDerived >
TriangularViewoperator= (const MatrixBase< OtherDerived > &other)
TriangularViewoperator= (const TriangularView &other)
template<typename OtherDerived >
void lazyAssign (const TriangularBase< OtherDerived > &other)
template<typename OtherDerived >
void lazyAssign (const MatrixBase< OtherDerived > &other)
TriangularView
< MatrixConjugateReturnType,
Mode > 
conjugate ()
const TriangularView
< MatrixConjugateReturnType,
Mode > 
conjugate () const
TriangularView< typename
MatrixType::AdjointReturnType,
TransposeMode > 
adjoint ()
const TriangularView< typename
MatrixType::AdjointReturnType,
TransposeMode > 
adjoint () const
TriangularView< Transpose
< MatrixType >, TransposeMode > 
transpose ()
const TriangularView
< Transpose< MatrixType >
, TransposeMode > 
transpose () const
template<typename OtherDerived >
TriangularProduct< Mode, true,
MatrixType, false,
OtherDerived,
OtherDerived::IsVectorAtCompileTime > 
operator* (const MatrixBase< OtherDerived > &rhs) const
 Efficient triangular matrix times vector/matrix product.
template<int Side, typename Other >
const
internal::triangular_solve_retval
< Side, TriangularView, Other > 
solve (const MatrixBase< Other > &other) const
template<int Side, typename OtherDerived >
void solveInPlace (const MatrixBase< OtherDerived > &other) const
 "in-place" version of TriangularView::solve() where the result is written in other
template<typename Other >
const
internal::triangular_solve_retval
< OnTheLeft, TriangularView,
Other > 
solve (const MatrixBase< Other > &other) const
template<typename OtherDerived >
void solveInPlace (const MatrixBase< OtherDerived > &other) const
const SelfAdjointView
< MatrixTypeNestedNonRef, Mode > 
selfadjointView () const
SelfAdjointView
< MatrixTypeNestedNonRef, Mode > 
selfadjointView ()
template<typename OtherDerived >
void swap (TriangularBase< OtherDerived > const &other)
template<typename OtherDerived >
void swap (MatrixBase< OtherDerived > const &other)
Scalar determinant () const
template<typename ProductDerived , typename Lhs , typename Rhs >
EIGEN_STRONG_INLINE
TriangularView
operator= (const ProductBase< ProductDerived, Lhs, Rhs > &other)
template<typename ProductDerived , typename Lhs , typename Rhs >
EIGEN_STRONG_INLINE
TriangularView
operator+= (const ProductBase< ProductDerived, Lhs, Rhs > &other)
template<typename ProductDerived , typename Lhs , typename Rhs >
EIGEN_STRONG_INLINE
TriangularView
operator-= (const ProductBase< ProductDerived, Lhs, Rhs > &other)
template<typename ProductDerived >
EIGEN_STRONG_INLINE
TriangularView
operator= (const ScaledProduct< ProductDerived > &other)
template<typename ProductDerived >
EIGEN_STRONG_INLINE
TriangularView
operator+= (const ScaledProduct< ProductDerived > &other)
template<typename ProductDerived >
EIGEN_STRONG_INLINE
TriangularView
operator-= (const ScaledProduct< ProductDerived > &other)
template<typename ProductDerived , typename _Lhs , typename _Rhs >
TriangularView< MatrixType,
UpLo > & 
assignProduct (const ProductBase< ProductDerived, _Lhs, _Rhs > &prod, const Scalar &alpha)
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 evalToLazy (MatrixBase< DenseDerived > &other) const
DenseMatrixType toDenseMatrix () const

Protected Types

typedef internal::traits
< TriangularView >
::MatrixTypeNested 
MatrixTypeNested
typedef internal::traits
< TriangularView >
::MatrixTypeNestedNonRef 
MatrixTypeNestedNonRef
typedef internal::traits
< TriangularView >
::MatrixTypeNestedCleaned 
MatrixTypeNestedCleaned
typedef internal::remove_all
< typename
MatrixType::ConjugateReturnType >
::type 
MatrixConjugateReturnType

Protected Member Functions

template<typename ProductDerived , typename Lhs , typename Rhs >
EIGEN_STRONG_INLINE
TriangularView
assignProduct (const ProductBase< ProductDerived, Lhs, Rhs > &prod, const Scalar &alpha)
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 >
TriangularProduct< Mode, false,
OtherDerived,
OtherDerived::IsVectorAtCompileTime,
MatrixType, false > 
operator* (const MatrixBase< OtherDerived > &lhs, const TriangularView &rhs)
 Efficient vector/matrix times triangular matrix product.

Member Typedef Documentation

Definition at line 177 of file Core.

Reimplemented from Eigen::TriangularBase< TriangularView< _MatrixType, _Mode > >.

Definition at line 181 of file Core.

Definition at line 59 of file Core.

Reimplemented from Eigen::TriangularBase< TriangularView< _MatrixType, _Mode > >.

Definition at line 196 of file Core.

typedef internal::remove_all<typename MatrixType::ConjugateReturnType>::type Eigen::TriangularView::MatrixConjugateReturnType [protected]

Definition at line 189 of file Core.

typedef _MatrixType Eigen::TriangularView::MatrixType

Definition at line 180 of file Core.

Definition at line 185 of file Core.

Definition at line 187 of file Core.

Definition at line 186 of file Core.

Definition at line 182 of file Core.

Reimplemented from Eigen::TriangularBase< TriangularView< _MatrixType, _Mode > >.

Definition at line 178 of file Core.

Reimplemented from Eigen::TriangularBase< TriangularView< _MatrixType, _Mode > >.

Definition at line 195 of file Core.


Member Enumeration Documentation

anonymous enum [inherited]

Definition at line 47 of file Core.

anonymous enum
Enumerator:
Mode 
TransposeMode 

Definition at line 198 of file Core.


Constructor & Destructor Documentation

Eigen::TriangularView::TriangularView ( const MatrixType matrix) [inline]

Definition at line 206 of file Core.


Member Function Documentation

TriangularView<typename MatrixType::AdjointReturnType,TransposeMode> Eigen::TriangularView::adjoint ( ) [inline]
See also:
MatrixBase::adjoint()

Definition at line 278 of file Core.

const TriangularView<typename MatrixType::AdjointReturnType,TransposeMode> Eigen::TriangularView::adjoint ( ) const [inline]
See also:
MatrixBase::adjoint() const

Definition at line 281 of file Core.

template<typename ProductDerived , typename _Lhs , typename _Rhs >
TriangularView<MatrixType,UpLo>& Eigen::TriangularView::assignProduct ( const ProductBase< ProductDerived, _Lhs, _Rhs > &  prod,
const Scalar alpha 
)

Definition at line 199 of file Core.

template<typename ProductDerived , typename Lhs , typename Rhs >
EIGEN_STRONG_INLINE TriangularView& Eigen::TriangularView::assignProduct ( const ProductBase< ProductDerived, Lhs, Rhs > &  prod,
const Scalar alpha 
) [protected]
void Eigen::TriangularBase::check_coordinates ( Index  row,
Index  col 
) const [inline, protected, inherited]

Definition at line 109 of file Core.

void Eigen::TriangularBase::check_coordinates_internal ( Index  ,
Index   
) const [inline, protected, inherited]

Definition at line 128 of file Core.

Scalar Eigen::TriangularBase::coeff ( Index  row,
Index  col 
) const [inline, inherited]

Definition at line 68 of file Core.

Scalar Eigen::TriangularView::coeff ( Index  row,
Index  col 
) const [inline]
See also:
MatrixBase::coeff()
Warning:
the coordinates must fit into the referenced triangular part

Definition at line 236 of file Core.

Scalar& Eigen::TriangularBase::coeffRef ( Index  row,
Index  col 
) [inline, inherited]

Definition at line 69 of file Core.

Scalar& Eigen::TriangularView::coeffRef ( Index  row,
Index  col 
) [inline]
See also:
MatrixBase::coeffRef()
Warning:
the coordinates must fit into the referenced triangular part

Definition at line 245 of file Core.

Index Eigen::TriangularView::cols ( void  ) const [inline]

Reimplemented from Eigen::TriangularBase< TriangularView< _MatrixType, _Mode > >.

Definition at line 210 of file Core.

TriangularView<MatrixConjugateReturnType,Mode> Eigen::TriangularView::conjugate ( ) [inline]
See also:
MatrixBase::conjugate()

Definition at line 271 of file Core.

const TriangularView<MatrixConjugateReturnType,Mode> Eigen::TriangularView::conjugate ( ) const [inline]
See also:
MatrixBase::conjugate() const

Definition at line 274 of file Core.

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

Definition at line 74 of file Core.

Scalar Eigen::TriangularView::determinant ( ) const [inline]

Definition at line 382 of file Core.

void Eigen::TriangularBase::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::TriangularBase::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.

void Eigen::TriangularView::fill ( const Scalar value) [inline]
See also:
MatrixBase::fill()

Definition at line 224 of file Core.

Index Eigen::TriangularView::innerStride ( ) const [inline]

Reimplemented from Eigen::TriangularBase< TriangularView< _MatrixType, _Mode > >.

Definition at line 212 of file Core.

template<typename OtherDerived >
void Eigen::TriangularView::lazyAssign ( const TriangularBase< OtherDerived > &  other)

Definition at line 660 of file Core.

template<typename OtherDerived >
void Eigen::TriangularView::lazyAssign ( const MatrixBase< OtherDerived > &  other)

Definition at line 623 of file Core.

const MatrixTypeNestedCleaned& Eigen::TriangularView::nestedExpression ( ) const [inline]

Definition at line 251 of file Core.

MatrixTypeNestedCleaned& Eigen::TriangularView::nestedExpression ( ) [inline]

Definition at line 252 of file Core.

Scalar Eigen::TriangularBase::operator() ( Index  row,
Index  col 
) const [inline, inherited]

Definition at line 79 of file Core.

Scalar& Eigen::TriangularBase::operator() ( Index  row,
Index  col 
) [inline, inherited]

Definition at line 84 of file Core.

template<typename OtherDerived >
TriangularProduct<Mode,true,MatrixType,false,OtherDerived,OtherDerived::IsVectorAtCompileTime> Eigen::TriangularView::operator* ( const MatrixBase< OtherDerived > &  rhs) const [inline]

Efficient triangular matrix times vector/matrix product.

Definition at line 297 of file Core.

TriangularView& Eigen::TriangularView::operator*= ( const typename internal::traits< MatrixType >::Scalar other) [inline]
See also:
MatrixBase::operator*=()

Definition at line 219 of file Core.

template<typename Other >
TriangularView& Eigen::TriangularView::operator+= ( const DenseBase< Other > &  other) [inline]
See also:
MatrixBase::operator+=()

Definition at line 215 of file Core.

template<typename ProductDerived , typename Lhs , typename Rhs >
EIGEN_STRONG_INLINE TriangularView& Eigen::TriangularView::operator+= ( const ProductBase< ProductDerived, Lhs, Rhs > &  other) [inline]

Definition at line 401 of file Core.

template<typename ProductDerived >
EIGEN_STRONG_INLINE TriangularView& Eigen::TriangularView::operator+= ( const ScaledProduct< ProductDerived > &  other) [inline]

Definition at line 421 of file Core.

template<typename Other >
TriangularView& Eigen::TriangularView::operator-= ( const DenseBase< Other > &  other) [inline]
See also:
MatrixBase::operator-=()

Definition at line 217 of file Core.

template<typename ProductDerived , typename Lhs , typename Rhs >
EIGEN_STRONG_INLINE TriangularView& Eigen::TriangularView::operator-= ( const ProductBase< ProductDerived, Lhs, Rhs > &  other) [inline]

Definition at line 407 of file Core.

template<typename ProductDerived >
EIGEN_STRONG_INLINE TriangularView& Eigen::TriangularView::operator-= ( const ScaledProduct< ProductDerived > &  other) [inline]

Definition at line 427 of file Core.

TriangularView& Eigen::TriangularView::operator/= ( const typename internal::traits< MatrixType >::Scalar other) [inline]
See also:
MatrixBase::operator/=()

Definition at line 221 of file Core.

template<typename OtherDerived >
TriangularView< MatrixType, Mode > & Eigen::TriangularView::operator= ( const TriangularBase< OtherDerived > &  other) [inline]

Assigns a triangular matrix to a triangular part of a dense matrix.

Definition at line 644 of file Core.

template<typename OtherDerived >
TriangularView< MatrixType, Mode > & Eigen::TriangularView::operator= ( const MatrixBase< OtherDerived > &  other) [inline]

Definition at line 607 of file Core.

TriangularView& Eigen::TriangularView::operator= ( const TriangularView other) [inline]

Definition at line 261 of file Core.

template<typename ProductDerived , typename Lhs , typename Rhs >
EIGEN_STRONG_INLINE TriangularView& Eigen::TriangularView::operator= ( const ProductBase< ProductDerived, Lhs, Rhs > &  other) [inline]

Definition at line 394 of file Core.

template<typename ProductDerived >
EIGEN_STRONG_INLINE TriangularView& Eigen::TriangularView::operator= ( const ScaledProduct< ProductDerived > &  other) [inline]

Definition at line 414 of file Core.

Index Eigen::TriangularView::outerStride ( ) const [inline]

Reimplemented from Eigen::TriangularBase< TriangularView< _MatrixType, _Mode > >.

Definition at line 211 of file Core.

Index Eigen::TriangularView::rows ( void  ) const [inline]

Reimplemented from Eigen::TriangularBase< TriangularView< _MatrixType, _Mode > >.

Definition at line 209 of file Core.

const SelfAdjointView<MatrixTypeNestedNonRef,Mode> Eigen::TriangularView::selfadjointView ( ) const [inline]

Definition at line 359 of file Core.

SelfAdjointView<MatrixTypeNestedNonRef,Mode> Eigen::TriangularView::selfadjointView ( ) [inline]

Definition at line 364 of file Core.

TriangularView& Eigen::TriangularView::setConstant ( const Scalar value) [inline]
See also:
MatrixBase::setConstant()

Definition at line 226 of file Core.

TriangularView& Eigen::TriangularView::setOnes ( ) [inline]
See also:
MatrixBase::setOnes()

Definition at line 231 of file Core.

TriangularView& Eigen::TriangularView::setZero ( ) [inline]
See also:
MatrixBase::setZero()

Definition at line 229 of file Core.

template<int Side, typename Other >
const internal::triangular_solve_retval< Side, TriangularView< Derived, Mode >, Other > Eigen::TriangularView::solve ( const MatrixBase< Other > &  other) const [inline]
Returns:
the product of the inverse of *this with other, *this being triangular.

This function computes the inverse-matrix matrix product inverse(*this) * other if Side==OnTheLeft (the default), or the right-inverse-multiply other * inverse(*this) if Side==OnTheRight.

The matrix *this must be triangular and invertible (i.e., all the coefficients of the diagonal must be non zero). It works as a forward (resp. backward) substitution if *this is an upper (resp. lower) triangular matrix.

Example:

Output:

This function returns an expression of the inverse-multiply and can works in-place if it is assigned to the same matrix or vector other.

For users coming from BLAS, this function (and more specifically solveInPlace()) offer all the operations supported by the *TRSV and *TRSM BLAS routines.

See also:
TriangularView::solveInPlace()

Definition at line 222 of file Core.

template<typename Other >
const internal::triangular_solve_retval<OnTheLeft,TriangularView, Other> Eigen::TriangularView::solve ( const MatrixBase< Other > &  other) const [inline]

Definition at line 352 of file Core.

template<int Side, typename OtherDerived >
void Eigen::TriangularView::solveInPlace ( const MatrixBase< OtherDerived > &  _other) const

"in-place" version of TriangularView::solve() where the result is written in other

Warning:
The parameter is only marked 'const' to make the C++ compiler accept a temporary expression here. This function will const_cast it, so constness isn't honored here.

See TriangularView:solve() for the details.

Definition at line 178 of file Core.

template<typename OtherDerived >
void Eigen::TriangularView::solveInPlace ( const MatrixBase< OtherDerived > &  other) const [inline]

Definition at line 356 of file Core.

template<typename OtherDerived >
void Eigen::TriangularView::swap ( TriangularBase< OtherDerived > const &  other) [inline]

Definition at line 371 of file Core.

template<typename OtherDerived >
void Eigen::TriangularView::swap ( MatrixBase< OtherDerived > const &  other) [inline]

Definition at line 377 of file Core.

DenseMatrixType Eigen::TriangularBase::toDenseMatrix ( ) const [inline, inherited]

Definition at line 100 of file Core.

TriangularView<Transpose<MatrixType>,TransposeMode> Eigen::TriangularView::transpose ( ) [inline]
See also:
MatrixBase::transpose()

Definition at line 285 of file Core.

const TriangularView<Transpose<MatrixType>,TransposeMode> Eigen::TriangularView::transpose ( ) const [inline]
See also:
MatrixBase::transpose() const

Definition at line 291 of file Core.


Friends And Related Function Documentation

template<typename OtherDerived >
TriangularProduct<Mode,false,OtherDerived,OtherDerived::IsVectorAtCompileTime,MatrixType,false> operator* ( const MatrixBase< OtherDerived > &  lhs,
const TriangularView rhs 
) [friend]

Efficient vector/matrix times triangular matrix product.

Definition at line 307 of file Core.


Member Data Documentation

Definition at line 437 of file Core.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011