Main MRPT website > C++ reference
MRPT logo
Public Types | Public Member Functions | Protected Attributes

Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType > Class Template Reference


Detailed Description

template<typename ConditionMatrixType, typename ThenMatrixType, typename ElseMatrixType>
class Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >

Expression of a coefficient wise version of the C++ ternary operator ?:

Parameters:
ConditionMatrixTypethe type of the condition expression which must be a boolean matrix
ThenMatrixTypethe type of the then expression
ElseMatrixTypethe type of the else expression

This class represents an expression of a coefficient wise version of the C++ ternary operator ?:. It is the return type of DenseBase::select() and most of the time this is the only way it is used.

See also:
DenseBase::select(const DenseBase<ThenDerived>&, const DenseBase<ElseDerived>&) const

Definition at line 68 of file Select.h.

#include <src/Core/Select.h>

Inheritance diagram for Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef
internal::dense_xpr_base
< Select >::type 
Base

Public Member Functions

 Select (const ConditionMatrixType &conditionMatrix, const ThenMatrixType &thenMatrix, const ElseMatrixType &elseMatrix)
Index rows () const
Index cols () const
const Scalar coeff (Index i, Index j) const
const Scalar coeff (Index i) const

Protected Attributes

const ConditionMatrixType::Nested m_condition
const ThenMatrixType::Nested m_then
const ElseMatrixType::Nested m_else

Member Typedef Documentation

template<typename ConditionMatrixType , typename ThenMatrixType , typename ElseMatrixType >
typedef internal::dense_xpr_base<Select>::type Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::Base

Definition at line 73 of file Select.h.


Constructor & Destructor Documentation

template<typename ConditionMatrixType , typename ThenMatrixType , typename ElseMatrixType >
Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::Select ( const ConditionMatrixType &  conditionMatrix,
const ThenMatrixType &  thenMatrix,
const ElseMatrixType &  elseMatrix 
) [inline]

Member Function Documentation

template<typename ConditionMatrixType , typename ThenMatrixType , typename ElseMatrixType >
const Scalar Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::coeff ( Index  i,
Index  j 
) const [inline]
template<typename ConditionMatrixType , typename ThenMatrixType , typename ElseMatrixType >
const Scalar Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::coeff ( Index  i ) const [inline]
template<typename ConditionMatrixType , typename ThenMatrixType , typename ElseMatrixType >
Index Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::cols ( void   ) const [inline]
template<typename ConditionMatrixType , typename ThenMatrixType , typename ElseMatrixType >
Index Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::rows ( void   ) const [inline]

Member Data Documentation

template<typename ConditionMatrixType , typename ThenMatrixType , typename ElseMatrixType >
const ConditionMatrixType::Nested Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::m_condition [protected]
template<typename ConditionMatrixType , typename ThenMatrixType , typename ElseMatrixType >
const ElseMatrixType::Nested Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::m_else [protected]
template<typename ConditionMatrixType , typename ThenMatrixType , typename ElseMatrixType >
const ThenMatrixType::Nested Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::m_then [protected]



Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:46:17 UTC 2011