10 #ifndef EIGEN_FLAGGED_H 11 #define EIGEN_FLAGGED_H 32 template<
typename ExpressionType,
unsigned int Added,
unsigned int Removed>
35 enum { Flags = (ExpressionType::Flags | Added) & ~Removed };
39 template<
typename ExpressionType,
unsigned int Added,
unsigned int Removed>
class Flagged 40 :
public MatrixBase<Flagged<ExpressionType, Added, Removed> >
51 inline Flagged(
const ExpressionType& matrix) : m_matrix(matrix) {}
53 inline Index rows()
const {
return m_matrix.rows(); }
54 inline Index cols()
const {
return m_matrix.cols(); }
60 return m_matrix.coeff(row, col);
65 return m_matrix.coeff(index);
70 return m_matrix.const_cast_derived().coeffRef(row, col);
75 return m_matrix.const_cast_derived().coeffRef(index);
80 return m_matrix.const_cast_derived().coeffRef(row, col);
85 return m_matrix.const_cast_derived().coeffRef(index);
88 template<
int LoadMode>
91 return m_matrix.template packet<LoadMode>(
row,
col);
94 template<
int LoadMode>
97 m_matrix.const_cast_derived().template writePacket<LoadMode>(
row,
col, x);
100 template<
int LoadMode>
103 return m_matrix.template packet<LoadMode>(index);
106 template<
int LoadMode>
109 m_matrix.const_cast_derived().template writePacket<LoadMode>(index, x);
114 template<
typename OtherDerived>
117 template<
typename OtherDerived>
130 template<
typename Derived>
131 template<
unsigned int Added,
unsigned int Removed>
140 #endif // EIGEN_FLAGGED_H ExpressionType::InnerIterator InnerIterator
const PacketScalar packet(Index row, Index col) const
internal::packet_traits< Scalar >::type PacketScalar
internal::traits< Derived >::Scalar Scalar
Base::CoeffReturnType CoeffReturnType
Expression with modified flags.
internal::traits< Derived >::Index Index
The type of indices.
const PacketScalar packet(Index index) const
Scalar & coeffRef(Index row, Index col)
CoeffReturnType coeff(Index row, Index col) const
Flagged(const ExpressionType &matrix)
Index outerStride() const
Index innerStride() const
const Scalar & coeffRef(Index index) const
void writePacket(Index row, Index col, const PacketScalar &x)
const ExpressionType & _expression() const
void writePacket(Index index, const PacketScalar &x)
CoeffReturnType coeff(Index index) const
Scalar & coeffRef(Index index)
const Scalar & coeffRef(Index row, Index col) const
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
const Flagged< Derived, Added, Removed > flagged() const
ExpressionTypeNested m_matrix
internal::conditional< internal::must_nest_by_value< ExpressionType >::ret, ExpressionType, const ExpressionType & >::type ExpressionTypeNested
MatrixBase< Flagged > Base
Base class for all dense matrices, vectors, and expressions.