10 #ifndef EIGEN_DENSECOEFFSBASE_H
11 #define EIGEN_DENSECOEFFSBASE_H
34 template<
typename Derived>
67 return int(Derived::RowsAtCompileTime) == 1 ? 0
68 : int(Derived::ColsAtCompileTime) == 1 ? inner
76 return int(Derived::ColsAtCompileTime) == 1 ? 0
77 : int(Derived::RowsAtCompileTime) == 1 ? inner
100 &&
col >= 0 &&
col < cols());
107 return coeff(rowIndexByOuterInner(outer, inner),
108 colIndexByOuterInner(outer, inner));
119 &&
col >= 0 &&
col < cols());
143 THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)
162 THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD)
189 x()
const {
return (*
this)[0]; }
197 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=2, OUT_OF_RANGE_ACCESS);
207 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=3, OUT_OF_RANGE_ACCESS);
217 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=4, OUT_OF_RANGE_ACCESS);
231 template<
int LoadMode>
241 template<
int LoadMode>
244 return packet<LoadMode>(rowIndexByOuterInner(outer, inner),
245 colIndexByOuterInner(outer, inner));
258 template<
int LoadMode>
262 THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)
301 template<
typename Derived>
318 using Base::rowIndexByOuterInner;
319 using Base::colIndexByOuterInner;
320 using Base::operator[];
321 using Base::operator();
345 &&
col >= 0 &&
col < cols());
353 return coeffRef(rowIndexByOuterInner(outer, inner),
354 colIndexByOuterInner(outer, inner));
367 &&
col >= 0 &&
col < cols());
368 return coeffRef(
row,
col);
392 THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)
409 THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD)
411 return coeffRef(index);
428 return coeffRef(index);
435 x() {
return (*
this)[0]; }
443 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=2, OUT_OF_RANGE_ACCESS);
453 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=3, OUT_OF_RANGE_ACCESS);
463 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=4, OUT_OF_RANGE_ACCESS);
480 template<
typename Derived>
501 return derived().innerStride();
512 return derived().outerStride();
518 return Derived::IsVectorAtCompileTime ? innerStride() : outerStride();
528 return Derived::IsRowMajor ? outerStride() : innerStride();
538 return Derived::IsRowMajor ? innerStride() : outerStride();
554 template<
typename Derived>
576 return derived().innerStride();
587 return derived().outerStride();
593 return Derived::IsVectorAtCompileTime ? innerStride() : outerStride();
603 return Derived::IsRowMajor ? outerStride() : innerStride();
613 return Derived::IsRowMajor ? innerStride() : outerStride();
619 template<
int Alignment,
typename Derived,
bool JustReturnZero>
626 template<
int Alignment,
typename Derived>
631 return internal::first_aligned<Alignment>(m.data(), m.size());
642 template<
int Alignment,
typename Derived>
649 template<
typename Derived>
652 typedef typename Derived::Scalar Scalar;
657 template<typename Derived, bool HasDirectAccess = has_direct_access<Derived>::ret>
663 template<
typename Derived>
669 template<typename Derived, bool HasDirectAccess = has_direct_access<Derived>::ret>
675 template<
typename Derived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ColXpr col(Index i)
This is the const version of col().
Definition: BlockMethods.h:1097
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE RowXpr row(Index i)
This is the const version of row(). */.
Definition: BlockMethods.h:1118
#define eigen_internal_assert(x)
Definition: Macros.h:1043
#define EIGEN_NOEXCEPT
Definition: Macros.h:1418
#define EIGEN_CONSTEXPR
Definition: Macros.h:787
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
#define eigen_assert(x)
Definition: Macros.h:1037
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition: StaticAssert.h:127
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:47
EIGEN_CONSTEXPR Index stride() const
Definition: DenseCoeffsBase.h:516
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index colStride() const
Definition: DenseCoeffsBase.h:536
DenseCoeffsBase< Derived, ReadOnlyAccessors > Base
Definition: DenseCoeffsBase.h:485
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerStride() const
Definition: DenseCoeffsBase.h:510
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rowStride() const
Definition: DenseCoeffsBase.h:526
NumTraits< Scalar >::Real RealScalar
Definition: DenseCoeffsBase.h:487
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index innerStride() const
Definition: DenseCoeffsBase.h:499
internal::traits< Derived >::Scalar Scalar
Definition: DenseCoeffsBase.h:486
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index innerStride() const EIGEN_NOEXCEPT
Definition: DenseCoeffsBase.h:574
NumTraits< Scalar >::Real RealScalar
Definition: DenseCoeffsBase.h:562
DenseCoeffsBase< Derived, WriteAccessors > Base
Definition: DenseCoeffsBase.h:560
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rowStride() const EIGEN_NOEXCEPT
Definition: DenseCoeffsBase.h:601
internal::traits< Derived >::Scalar Scalar
Definition: DenseCoeffsBase.h:561
EIGEN_CONSTEXPR Index stride() const EIGEN_NOEXCEPT
Definition: DenseCoeffsBase.h:591
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerStride() const EIGEN_NOEXCEPT
Definition: DenseCoeffsBase.h:585
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index colStride() const EIGEN_NOEXCEPT
Definition: DenseCoeffsBase.h:611
Base class providing read-only coefficient access to matrices and arrays.
Definition: DenseCoeffsBase.h:36
internal::packet_traits< Scalar >::type PacketScalar
Definition: DenseCoeffsBase.h:40
internal::traits< Derived >::StorageKind StorageKind
Definition: DenseCoeffsBase.h:38
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType operator()(Index row, Index col) const
Definition: DenseCoeffsBase.h:116
internal::conditional< bool(internal::traits< Derived >::Flags &LvalueBit), const Scalar &, typename internal::conditional< internal::is_arithmetic< Scalar >::value, Scalar, const Scalar >::type >::type CoeffReturnType
Definition: DenseCoeffsBase.h:52
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType x() const
Definition: DenseCoeffsBase.h:189
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType w() const
Definition: DenseCoeffsBase.h:215
void coeffRefByOuterInner()
EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
Definition: DenseCoeffsBase.h:259
void copyCoeffByOuterInner()
void writePacketByOuterInner()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType operator()(Index index) const
Definition: DenseCoeffsBase.h:179
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index colIndexByOuterInner(Index outer, Index inner) const
Definition: DenseCoeffsBase.h:74
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeffByOuterInner(Index outer, Index inner) const
Definition: DenseCoeffsBase.h:105
internal::add_const_on_value_type_if_arithmetic< typename internal::packet_traits< Scalar >::type >::type PacketReturnType
Definition: DenseCoeffsBase.h:56
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType z() const
Definition: DenseCoeffsBase.h:205
EIGEN_STRONG_INLINE PacketReturnType packetByOuterInner(Index outer, Index inner) const
Definition: DenseCoeffsBase.h:242
EIGEN_STRONG_INLINE PacketReturnType packet(Index row, Index col) const
Definition: DenseCoeffsBase.h:232
internal::traits< Derived >::Scalar Scalar
Definition: DenseCoeffsBase.h:39
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rowIndexByOuterInner(Index outer, Index inner) const
Definition: DenseCoeffsBase.h:65
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType operator[](Index index) const
Definition: DenseCoeffsBase.h:159
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
Definition: DenseCoeffsBase.h:97
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
Definition: DenseCoeffsBase.h:140
EigenBase< Derived > Base
Definition: DenseCoeffsBase.h:58
void copyPacketByOuterInner()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType y() const
Definition: DenseCoeffsBase.h:195
Base class providing read/write coefficient access to matrices and arrays.
Definition: DenseCoeffsBase.h:303
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRefByOuterInner(Index outer, Index inner)
Definition: DenseCoeffsBase.h:351
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & w()
Definition: DenseCoeffsBase.h:461
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & x()
Definition: DenseCoeffsBase.h:435
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
Definition: DenseCoeffsBase.h:389
NumTraits< Scalar >::Real RealScalar
Definition: DenseCoeffsBase.h:311
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator[](Index index)
Definition: DenseCoeffsBase.h:406
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index index)
Definition: DenseCoeffsBase.h:425
DenseCoeffsBase< Derived, ReadOnlyAccessors > Base
Definition: DenseCoeffsBase.h:306
internal::packet_traits< Scalar >::type PacketScalar
Definition: DenseCoeffsBase.h:310
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index row, Index col)
Definition: DenseCoeffsBase.h:364
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & y()
Definition: DenseCoeffsBase.h:441
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & z()
Definition: DenseCoeffsBase.h:451
internal::traits< Derived >::Scalar Scalar
Definition: DenseCoeffsBase.h:309
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
Definition: DenseCoeffsBase.h:342
internal::traits< Derived >::StorageKind StorageKind
Definition: DenseCoeffsBase.h:308
Definition: ForwardDeclarations.h:50
@ DirectAccessors
Definition: Constants.h:380
@ ReadOnlyAccessors
Definition: Constants.h:376
@ WriteAccessors
Definition: Constants.h:378
@ DirectWriteAccessors
Definition: Constants.h:382
const unsigned int LinearAccessBit
Definition: Constants.h:130
const unsigned int DirectAccessBit
Definition: Constants.h:155
const unsigned int LvalueBit
Definition: Constants.h:144
const unsigned int RowMajorBit
Definition: Constants.h:66
const Scalar & y
Definition: MathFunctions.h:821
static Index first_default_aligned(const DenseBase< Derived > &m)
Definition: DenseCoeffsBase.h:650
EIGEN_CONSTEXPR Index size(const T &x)
Definition: Meta.h:479
static Index first_aligned(const DenseBase< Derived > &m)
Definition: DenseCoeffsBase.h:643
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
type
The type the bitset is encoded with.
Definition: bitset.hpp:44
Flags
Special flags for archives.
Definition: cereal.hpp:185
Definition: document.h:416
Definition: EigenBase.h:30
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:39
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:233
Definition: DenseCoeffsBase.h:17
conditional< is_arithmetic< T >::value, T, typename add_const_on_value_type< T >::type >::type type
Definition: DenseCoeffsBase.h:18
const T type
Definition: Meta.h:214
Definition: CoreEvaluators.h:91
static Index run(const Derived &m)
Definition: DenseCoeffsBase.h:629
Definition: DenseCoeffsBase.h:621
static EIGEN_CONSTEXPR Index run(const Derived &) EIGEN_NOEXCEPT
Definition: DenseCoeffsBase.h:622
Definition: DenseCoeffsBase.h:659
@ ret
Definition: DenseCoeffsBase.h:660
Definition: DenseCoeffsBase.h:671
@ ret
Definition: DenseCoeffsBase.h:672
T type
Definition: GenericPacketMath.h:108
Definition: ForwardDeclarations.h:17
Definition: GenericPacketMath.h:133
#define const
Definition: zconf.h:233