10#ifndef EIGEN_ARRAYWRAPPER_H
11#define EIGEN_ARRAYWRAPPER_H
27template<
typename ExpressionType>
29 :
public traits<typename remove_all<typename ExpressionType::Nested>::type >
36 Flags = (Flags0 & ~(NestByRefBit |
LvalueBit)) | LvalueBitFlag
41template<
typename ExpressionType>
48 typedef typename internal::remove_all<ExpressionType>::type NestedExpression;
63 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
64 inline Index rows()
const EIGEN_NOEXCEPT {
return m_expression.rows(); }
65 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
66 inline Index cols()
const EIGEN_NOEXCEPT {
return m_expression.cols(); }
67 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
68 inline Index outerStride()
const EIGEN_NOEXCEPT {
return m_expression.outerStride(); }
69 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
70 inline Index innerStride()
const EIGEN_NOEXCEPT {
return m_expression.innerStride(); }
75 inline const Scalar* data()
const {
return m_expression.data(); }
84 inline const Scalar& coeffRef(
Index index)
const
86 return m_expression.coeffRef(index);
89 template<
typename Dest>
91 inline void evalTo(
Dest&
dst)
const {
dst = m_expression; }
94 const typename internal::remove_all<NestedExpressionType>::type&
95 nestedExpression()
const
110 NestedExpressionType m_expression;
125template<
typename ExpressionType>
127 :
public traits<typename remove_all<typename ExpressionType::Nested>::type >
134 Flags = (Flags0 & ~(NestByRefBit |
LvalueBit)) | LvalueBitFlag
139template<
typename ExpressionType>
146 typedef typename internal::remove_all<ExpressionType>::type NestedExpression;
156 using Base::coeffRef;
159 explicit inline MatrixWrapper(ExpressionType& matrix) : m_expression(matrix) {}
161 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
162 inline Index rows()
const EIGEN_NOEXCEPT {
return m_expression.rows(); }
163 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
164 inline Index cols()
const EIGEN_NOEXCEPT {
return m_expression.cols(); }
165 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
166 inline Index outerStride()
const EIGEN_NOEXCEPT {
return m_expression.outerStride(); }
167 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
168 inline Index innerStride()
const EIGEN_NOEXCEPT {
return m_expression.innerStride(); }
173 inline const Scalar* data()
const {
return m_expression.data(); }
178 return m_expression.derived().coeffRef(
rowId,
colId);
182 inline const Scalar& coeffRef(
Index index)
const
184 return m_expression.coeffRef(index);
188 const typename internal::remove_all<NestedExpressionType>::type&
189 nestedExpression()
const
204 NestedExpressionType m_expression;
Base class for all 1D and 2D array, and related expressions.
Definition ArrayBase.h:41
EIGEN_DEVICE_FUNC MatrixWrapper< ArrayWrapper< ExpressionType > > matrix()
Definition ArrayBase.h:148
Expression of a mathematical vector or matrix as an array object.
Definition ArrayWrapper.h:43
EIGEN_DEVICE_FUNC void resize(Index newSize)
Forwards the resizing request to the nested expression.
Definition ArrayWrapper.h:103
EIGEN_DEVICE_FUNC void resize(Index rows, Index cols)
Forwards the resizing request to the nested expression.
Definition ArrayWrapper.h:107
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
Expression of an array as a mathematical vector or matrix.
Definition ArrayWrapper.h:141
EIGEN_DEVICE_FUNC void resize(Index newSize)
Forwards the resizing request to the nested expression.
Definition ArrayWrapper.h:197
EIGEN_DEVICE_FUNC void resize(Index rows, Index cols)
Forwards the resizing request to the nested expression.
Definition ArrayWrapper.h:201
const unsigned int LvalueBit
Means the expression has a coeffRef() method, i.e.
Definition Constants.h:144
Namespace containing all symbols from the Eigen library.
Definition LDLT.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
The type used to identify an array expression.
Definition Constants.h:525
The type used to identify a matrix expression.
Definition Constants.h:522
Definition XprHelper.h:660
Definition ForwardDeclarations.h:17