|
MOAB
4.9.3pre
|
Expression of a coefficient wise version of the C++ ternary operator ?: More...
#include <Select.h>


Public Types | |
| typedef internal::dense_xpr_base < Select >::type | Base |
Public Member Functions | |
| EIGEN_DEVICE_FUNC | Select (const ConditionMatrixType &a_conditionMatrix, const ThenMatrixType &a_thenMatrix, const ElseMatrixType &a_elseMatrix) |
| EIGEN_DEVICE_FUNC Index | rows () const |
| EIGEN_DEVICE_FUNC Index | cols () const |
| EIGEN_DEVICE_FUNC const Scalar | coeff (Index i, Index j) const |
| EIGEN_DEVICE_FUNC const Scalar | coeff (Index i) const |
| EIGEN_DEVICE_FUNC const ConditionMatrixType & | conditionMatrix () const |
| EIGEN_DEVICE_FUNC const ThenMatrixType & | thenMatrix () const |
| EIGEN_DEVICE_FUNC const ElseMatrixType & | elseMatrix () const |
Protected Attributes | |
| ConditionMatrixType::Nested | m_condition |
| ThenMatrixType::Nested | m_then |
| ElseMatrixType::Nested | m_else |
Expression of a coefficient wise version of the C++ ternary operator ?:
| ConditionMatrixType | the type of the condition expression which must be a boolean matrix |
| ThenMatrixType | the type of the then expression |
| ElseMatrixType | the 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.
| typedef internal::dense_xpr_base<Select>::type Eigen::Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::Base |
| EIGEN_DEVICE_FUNC Eigen::Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::Select | ( | const ConditionMatrixType & | a_conditionMatrix, |
| const ThenMatrixType & | a_thenMatrix, | ||
| const ElseMatrixType & | a_elseMatrix | ||
| ) | [inline] |
Definition at line 61 of file Select.h.
: m_condition(a_conditionMatrix), m_then(a_thenMatrix), m_else(a_elseMatrix) { eigen_assert(m_condition.rows() == m_then.rows() && m_condition.rows() == m_else.rows()); eigen_assert(m_condition.cols() == m_then.cols() && m_condition.cols() == m_else.cols()); }
| EIGEN_DEVICE_FUNC const Scalar Eigen::Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::coeff | ( | Index | i, |
| Index | j | ||
| ) | const [inline] |
Definition at line 74 of file Select.h.
{
if (m_condition.coeff(i,j))
return m_then.coeff(i,j);
else
return m_else.coeff(i,j);
}
| EIGEN_DEVICE_FUNC const Scalar Eigen::Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::coeff | ( | Index | i | ) | const [inline] |
Definition at line 83 of file Select.h.
{
if (m_condition.coeff(i))
return m_then.coeff(i);
else
return m_else.coeff(i);
}
| EIGEN_DEVICE_FUNC Index Eigen::Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::cols | ( | void | ) | const [inline] |
Definition at line 71 of file Select.h.
{ return m_condition.cols(); }
| EIGEN_DEVICE_FUNC const ConditionMatrixType& Eigen::Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::conditionMatrix | ( | ) | const [inline] |
Definition at line 91 of file Select.h.
{
return m_condition;
}
| EIGEN_DEVICE_FUNC const ElseMatrixType& Eigen::Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::elseMatrix | ( | ) | const [inline] |
| EIGEN_DEVICE_FUNC Index Eigen::Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::rows | ( | void | ) | const [inline] |
Definition at line 70 of file Select.h.
{ return m_condition.rows(); }
| EIGEN_DEVICE_FUNC const ThenMatrixType& Eigen::Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::thenMatrix | ( | ) | const [inline] |
ConditionMatrixType::Nested Eigen::Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::m_condition [protected] |
ElseMatrixType::Nested Eigen::Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::m_else [protected] |
ThenMatrixType::Nested Eigen::Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType >::m_then [protected] |