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());
120 return coeff(row, col);
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)
275 void coeffRefByOuterInner();
277 void writePacketByOuterInner();
279 void copyCoeffByOuterInner();
281 void copyPacketByOuterInner();
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>
654 return internal::first_aligned<int(unpacket_traits<DefaultPacketType>::alignment),Derived>(m);
663 template<
typename Derived>
675 template<
typename Derived>
685 #endif // EIGEN_DENSECOEFFSBASE_H
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index innerStride() const EIGEN_NOEXCEPT
EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
#define EIGEN_STRONG_INLINE
static Index first_aligned(const DenseBase< Derived > &m)
EigenBase< Derived > Base
const unsigned int DirectAccessBit
const unsigned int LvalueBit
NumTraits< Scalar >::Real RealScalar
NumTraits< Scalar >::Real RealScalar
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index index)
Namespace containing all symbols from the Eigen library.
internal::packet_traits< Scalar >::type PacketScalar
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
internal::traits< Derived >::StorageKind StorageKind
Eigen::Index Index
The interface type of indices.
const unsigned int RowMajorBit
Base class for all dense matrices, vectors, and arrays.
NumTraits< Scalar >::Real RealScalar
DenseCoeffsBase< Derived, ReadOnlyAccessors > Base
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index colStride() const
static Index first_default_aligned(const DenseBase< Derived > &m)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType operator()(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index row, Index col)
conditional< is_arithmetic< T >::value, T, typename add_const_on_value_type< T >::type >::type type
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType w() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType operator()(Index index) const
internal::add_const_on_value_type_if_arithmetic< typename internal::packet_traits< Scalar >::type >::type PacketReturnType
internal::traits< Derived >::Scalar Scalar
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index innerStride() const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_CONSTEXPR Index stride() const EIGEN_NOEXCEPT
internal::packet_traits< Scalar >::type PacketScalar
static EIGEN_CONSTEXPR Index run(const Derived &) EIGEN_NOEXCEPT
Eigen::Triplet< double > T
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType operator[](Index index) const
internal::traits< Derived >::Scalar Scalar
DenseCoeffsBase< Derived, WriteAccessors > Base
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRefByOuterInner(Index outer, Index inner)
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rowStride() const EIGEN_NOEXCEPT
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType z() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
static Index run(const Derived &m)
EIGEN_CONSTEXPR Index stride() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & x()
EIGEN_CONSTEXPR Index size(const T &x)
#define EIGEN_DEVICE_FUNC
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & y()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerStride() const EIGEN_NOEXCEPT
EIGEN_STRONG_INLINE PacketReturnType packet(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerStride() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index colIndexByOuterInner(Index outer, Index inner) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeffByOuterInner(Index outer, Index inner) const
internal::traits< Derived >::Scalar Scalar
Base class providing read-only coefficient access to matrices and arrays.
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rowStride() const
EIGEN_STRONG_INLINE PacketReturnType packetByOuterInner(Index outer, Index inner) const
DenseCoeffsBase< Derived, ReadOnlyAccessors > Base
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType y() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator[](Index index)
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index colStride() const EIGEN_NOEXCEPT
#define eigen_internal_assert(x)
internal::traits< Derived >::StorageKind StorageKind
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & z()
Generic expression where a coefficient-wise unary operator is applied to an expression.
Base class providing read/write coefficient access to matrices and arrays.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rowIndexByOuterInner(Index outer, Index inner) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType x() const
internal::traits< Derived >::Scalar Scalar
const unsigned int LinearAccessBit
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & w()