10 #ifndef EIGEN_DENSECOEFFSBASE_H 11 #define EIGEN_DENSECOEFFSBASE_H 33 template<
typename Derived>
66 return int(Derived::RowsAtCompileTime) == 1 ? 0
67 :
int(Derived::ColsAtCompileTime) == 1 ? inner
75 return int(Derived::ColsAtCompileTime) == 1 ? 0
76 :
int(Derived::RowsAtCompileTime) == 1 ? inner
99 && col >= 0 && col <
cols());
106 return coeff(rowIndexByOuterInner(outer, inner),
107 colIndexByOuterInner(outer, inner));
118 && col >= 0 && col <
cols());
119 return coeff(row, col);
142 THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)
161 THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD)
188 x()
const {
return (*
this)[0]; }
196 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=2, OUT_OF_RANGE_ACCESS);
206 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=3, OUT_OF_RANGE_ACCESS);
216 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=4, OUT_OF_RANGE_ACCESS);
230 template<
int LoadMode>
240 template<
int LoadMode>
243 return packet<LoadMode>(rowIndexByOuterInner(outer, inner),
244 colIndexByOuterInner(outer, inner));
257 template<
int LoadMode>
261 THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)
274 void coeffRefByOuterInner();
276 void writePacketByOuterInner();
278 void copyCoeffByOuterInner();
280 void copyPacketByOuterInner();
299 template<
typename Derived>
316 using Base::rowIndexByOuterInner;
317 using Base::colIndexByOuterInner;
318 using Base::operator[];
319 using Base::operator();
343 && col >= 0 && col <
cols());
351 return coeffRef(rowIndexByOuterInner(outer, inner),
352 colIndexByOuterInner(outer, inner));
365 && col >= 0 && col <
cols());
366 return coeffRef(row, col);
390 THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)
407 THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD)
409 return coeffRef(index);
426 return coeffRef(index);
433 x() {
return (*
this)[0]; }
441 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=2, OUT_OF_RANGE_ACCESS);
451 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=3, OUT_OF_RANGE_ACCESS);
461 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=4, OUT_OF_RANGE_ACCESS);
477 template<
typename Derived>
498 return derived().innerStride();
509 return derived().outerStride();
515 return Derived::IsVectorAtCompileTime ? innerStride() : outerStride();
525 return Derived::IsRowMajor ? outerStride() : innerStride();
535 return Derived::IsRowMajor ? innerStride() : outerStride();
550 template<
typename Derived>
572 return derived().innerStride();
583 return derived().outerStride();
589 return Derived::IsVectorAtCompileTime ? innerStride() : outerStride();
599 return Derived::IsRowMajor ? outerStride() : innerStride();
609 return Derived::IsRowMajor ? innerStride() : outerStride();
615 template<
int Alignment,
typename Derived,
bool JustReturnZero>
622 template<
int Alignment,
typename Derived>
627 return internal::first_aligned<Alignment>(m.data(), m.size());
638 template<
int Alignment,
typename Derived>
645 template<
typename Derived>
650 return internal::first_aligned<int(unpacket_traits<DefaultPacketType>::alignment),Derived>(m);
659 template<
typename Derived>
671 template<
typename Derived>
681 #endif // EIGEN_DENSECOEFFSBASE_H
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC Index outerStride() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index colIndexByOuterInner(Index outer, Index inner) const
static Index first_aligned(const DenseBase< Derived > &m)
EIGEN_DEVICE_FUNC Index rowStride() const
EigenBase< Derived > Base
EIGEN_DEVICE_FUNC Index outerStride() const
EIGEN_DEVICE_FUNC Index rowStride() const
const unsigned int DirectAccessBit
EIGEN_STRONG_INLINE PacketReturnType packet(Index row, Index col) const
const unsigned int LvalueBit
EIGEN_DEVICE_FUNC Index colStride() const
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_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType z() const
Eigen::Index Index
The interface type of indices.
const unsigned int RowMajorBit
Base class for all dense matrices, vectors, and arrays.
EIGEN_DEVICE_FUNC Index innerStride() const
NumTraits< Scalar >::Real RealScalar
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType operator[](Index index) const
DenseCoeffsBase< Derived, ReadOnlyAccessors > Base
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeffByOuterInner(Index outer, Index inner) const
static Index first_default_aligned(const DenseBase< Derived > &m)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index row, Index col)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType w() const
conditional< is_arithmetic< T >::value, T, typename add_const_on_value_type< T >::type >::type type
EIGEN_STRONG_INLINE PacketReturnType packetByOuterInner(Index outer, Index inner) 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 Index innerStride() const
EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType operator()(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
internal::packet_traits< Scalar >::type PacketScalar
Eigen::Triplet< double > T
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_STRONG_INLINE CoeffReturnType x() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
static Index run(const Derived &m)
EIGEN_DEVICE_FUNC Index colStride() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & x()
static Index run(const Derived &)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & y()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
internal::traits< Derived >::Scalar Scalar
Base class providing read-only coefficient access to matrices and arrays.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rowIndexByOuterInner(Index outer, Index inner) const
DenseCoeffsBase< Derived, ReadOnlyAccessors > Base
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator[](Index index)
#define eigen_internal_assert(x)
internal::traits< Derived >::StorageKind StorageKind
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & z()
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 CoeffReturnType y() const
internal::traits< Derived >::Scalar Scalar
const unsigned int LinearAccessBit
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & w()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType operator()(Index row, Index col) const