10 #ifndef EIGEN_INDEXED_VIEW_H 11 #define EIGEN_INDEXED_VIEW_H 17 template<
typename XprType,
typename RowIndices,
typename ColIndices>
25 MaxColsAtCompileTime = ColsAtCompileTime !=
Dynamic ? int(ColsAtCompileTime) :
Dynamic,
28 IsRowMajor = (MaxRowsAtCompileTime==1&&MaxColsAtCompileTime!=1) ? 1
29 : (MaxColsAtCompileTime==1&&MaxRowsAtCompileTime!=1) ? 0
34 InnerIncr = IsRowMajor ? ColIncr : RowIncr,
35 OuterIncr = IsRowMajor ? RowIncr : ColIncr,
37 HasSameStorageOrderAsXprType = (IsRowMajor == XprTypeIsRowMajor),
41 InnerSize = XprTypeIsRowMajor ? ColsAtCompileTime : RowsAtCompileTime,
42 IsBlockAlike = InnerIncr==1 && OuterIncr==1,
45 InnerStrideAtCompileTime = InnerIncr<0 || InnerIncr==
DynamicIndex || XprInnerStride==
Dynamic ?
Dynamic : XprInnerStride * InnerIncr,
46 OuterStrideAtCompileTime = OuterIncr<0 || OuterIncr==
DynamicIndex || XprOuterstride==
Dynamic ?
Dynamic : XprOuterstride * OuterIncr,
49 ReturnAsBlock = (!ReturnAsScalar) && IsBlockAlike,
50 ReturnAsIndexedView = (!ReturnAsScalar) && (!ReturnAsBlock),
57 FlagsLinearAccessBit = (RowsAtCompileTime == 1 || ColsAtCompileTime == 1) ?
LinearAccessBit : 0,
66 template<
typename XprType,
typename RowIndices,
typename ColIndices,
typename StorageKind>
108 template<
typename XprType,
typename RowIndices,
typename ColIndices>
119 template<typename T0, typename
T1>
121 : m_xpr(xpr), m_rowIndices(rowIndices), m_colIndices(colIndices)
139 const RowIndices&
rowIndices()
const {
return m_rowIndices; }
142 const ColIndices&
colIndices()
const {
return m_colIndices; }
152 template<
typename XprType,
typename RowIndices,
typename ColIndices,
typename StorageKind>
163 template<
typename ArgType,
typename RowIndices,
typename ColIndices>
192 return m_argImpl.coeff(m_xpr.rowIndices()[
row], m_xpr.colIndices()[
col]);
198 return m_argImpl.coeffRef(m_xpr.rowIndices()[
row], m_xpr.colIndices()[
col]);
205 Index row = XprType::RowsAtCompileTime == 1 ? 0 : index;
206 Index col = XprType::RowsAtCompileTime == 1 ? index : 0;
207 return m_argImpl.coeffRef( m_xpr.rowIndices()[
row], m_xpr.colIndices()[
col]);
213 Index row = XprType::RowsAtCompileTime == 1 ? 0 : index;
214 Index col = XprType::RowsAtCompileTime == 1 ? index : 0;
215 return m_argImpl.coeffRef( m_xpr.rowIndices()[
row], m_xpr.colIndices()[
col]);
221 Index row = XprType::RowsAtCompileTime == 1 ? 0 : index;
222 Index col = XprType::RowsAtCompileTime == 1 ? index : 0;
223 return m_argImpl.coeff( m_xpr.rowIndices()[
row], m_xpr.colIndices()[
col]);
237 #endif // EIGEN_INDEXED_VIEW_H
#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived)
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CoeffReturnType coeff(Index index) const
const ColIndices & colIndices() const
const unsigned int DirectAccessBit
const RowIndices & rowIndices() const
XprType::CoeffReturnType CoeffReturnType
internal::generic_xpr_base< IndexedView< XprType, RowIndices, ColIndices > >::type Base
const unsigned int LvalueBit
Namespace containing all symbols from the Eigen library.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeffRef(Index index) const
const unsigned int RowMajorBit
IndexedView< ArgType, RowIndices, ColIndices > XprType
#define EIGEN_STATIC_ASSERT_LVALUE(Derived)
IndexedViewImpl< XprType, RowIndices, ColIndices, typename internal::traits< XprType >::StorageKind >::Base Base
#define EIGEN_INTERNAL_CHECK_COST_VALUE(C)
Generic expression where a coefficient-wise binary operator is applied to two expressions.
const unsigned int HereditaryBits
const internal::remove_all< XprType >::type & nestedExpression() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived)
evaluator< ArgType > m_argImpl
EIGEN_CONSTEXPR Index size(const T &x)
#define EIGEN_DEVICE_FUNC
EIGEN_DEVICE_FUNC unary_evaluator(const XprType &xpr)
Expression of a fixed-size or dynamic-size block.
internal::remove_reference< XprType >::type & nestedExpression()
static const Similarity3 T1(R, Point3(3.5, -8.2, 4.2), 1)
Expression of a non-sequential sub-matrix defined by arbitrary sequences of row and column indices...
Generic expression where a coefficient-wise unary operator is applied to an expression.
const unsigned int LinearAccessBit
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
Block< XprType, RowsAtCompileTime, ColsAtCompileTime, IsInnerPannel > BlockType