10 #ifndef EIGEN_ARRAYWRAPPER_H 11 #define EIGEN_ARRAYWRAPPER_H 27 template<
typename ExpressionType>
29 :
public traits<typename remove_all<typename ExpressionType::Nested>::type >
41 template<
typename ExpressionType>
50 typedef typename
internal::conditional<
51 internal::is_lvalue<ExpressionType>::value,
64 inline Index rows()
const {
return m_expression.rows(); }
66 inline Index cols()
const {
return m_expression.cols(); }
75 inline const Scalar*
data()
const {
return m_expression.data(); }
80 return m_expression.coeffRef(rowId, colId);
86 return m_expression.coeffRef(index);
89 template<
typename Dest>
91 inline void evalTo(Dest& dst)
const { dst = m_expression; }
125 template<
typename ExpressionType>
127 :
public traits<typename remove_all<typename ExpressionType::Nested>::type >
139 template<
typename ExpressionType>
148 typedef typename
internal::conditional<
149 internal::is_lvalue<ExpressionType>::value,
156 using Base::coeffRef;
159 explicit inline
MatrixWrapper(ExpressionType& matrix) : m_expression(matrix) {}
162 inline Index rows()
const {
return m_expression.rows(); }
164 inline Index cols()
const {
return m_expression.cols(); }
173 inline const Scalar*
data()
const {
return m_expression.data(); }
178 return m_expression.derived().coeffRef(rowId, colId);
184 return m_expression.coeffRef(index);
209 #endif // EIGEN_ARRAYWRAPPER_H EIGEN_DEVICE_FUNC ScalarWithConstIfNotLvalue * data()
NestedExpressionType m_expression
internal::remove_all< ExpressionType >::type NestedExpression
EIGEN_DEVICE_FUNC void resize(Index rows, Index cols)
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC Index rows() const
EIGEN_DEVICE_FUNC Index rows() const
internal::traits< Derived >::Scalar Scalar
Expression of a mathematical vector or matrix as an array object.
EIGEN_DEVICE_FUNC Index outerStride() const
EIGEN_DEVICE_FUNC void evalTo(Dest &dst) const
EIGEN_DEVICE_FUNC Index innerStride() const
const unsigned int LvalueBit
EIGEN_DEVICE_FUNC Index outerStride() const
EIGEN_DEVICE_FUNC void resize(Index newSize)
MatrixBase< MatrixWrapper< ExpressionType > > Base
Expression of an array as a mathematical vector or matrix.
NestedExpressionType m_expression
EIGEN_DEVICE_FUNC Index cols() const
const internal::remove_all< NestedExpressionType >::type &EIGEN_DEVICE_FUNC nestedExpression() const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_DEVICE_FUNC const Scalar * data() const
EIGEN_DEVICE_FUNC const Scalar & coeffRef(Index index) const
EIGEN_DEVICE_FUNC Index innerStride() const
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived)
ArrayBase< ArrayWrapper > Base
Base class for all 1D and 2D array, and related expressions.
internal::remove_all< ExpressionType >::type NestedExpression
EIGEN_DEVICE_FUNC const Scalar & coeffRef(Index rowId, Index colId) const
EIGEN_DEVICE_FUNC void resize(Index newSize)
const unsigned int NestByRefBit
EIGEN_DEVICE_FUNC const internal::remove_all< NestedExpressionType >::type & nestedExpression() const
EIGEN_DEVICE_FUNC void resize(Index rows, Index cols)
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
EIGEN_DEVICE_FUNC const Scalar * data() const
EIGEN_DEVICE_FUNC const Scalar & coeffRef(Index rowId, Index colId) const
Base class for all dense matrices, vectors, and expressions.
EIGEN_DEVICE_FUNC ScalarWithConstIfNotLvalue * data()
EIGEN_DEVICE_FUNC Index cols() const
EIGEN_DEVICE_FUNC const Scalar & coeffRef(Index index) const