12 #ifndef EIGEN_REVERSE_H 13 #define EIGEN_REVERSE_H 19 template<
typename MatrixType,
int Direction>
29 RowsAtCompileTime = MatrixType::RowsAtCompileTime,
30 ColsAtCompileTime = MatrixType::ColsAtCompileTime,
31 MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
32 MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,
63 template<
typename MatrixType,
int Direction>
class Reverse 71 using Base::IsRowMajor;
76 IsColMajor = !IsRowMajor,
79 OffsetRow = ReverseRow && IsColMajor ? PacketSize : 1,
80 OffsetCol = ReverseCol && IsRowMajor ? PacketSize : 1,
82 || ((Direction ==
Vertical) && IsColMajor)
99 return -m_matrix.innerStride();
118 template<
typename Derived>
140 template<
typename Derived>
167 template<
int Direction>
173 template<
typename ExpressionType>
174 static void run(ExpressionType &xpr)
176 const int HalfAtCompileTime = ExpressionType::RowsAtCompileTime==
Dynamic?
Dynamic:ExpressionType::RowsAtCompileTime/2;
178 xpr.topRows(fix<HalfAtCompileTime>(half))
179 .swap(xpr.bottomRows(fix<HalfAtCompileTime>(half)).colwise().reverse());
186 template<
typename ExpressionType>
187 static void run(ExpressionType &xpr)
189 const int HalfAtCompileTime = ExpressionType::ColsAtCompileTime==
Dynamic?
Dynamic:ExpressionType::ColsAtCompileTime/2;
191 xpr.leftCols(fix<HalfAtCompileTime>(half))
192 .swap(xpr.rightCols(fix<HalfAtCompileTime>(half)).rowwise().reverse());
209 template<
typename ExpressionType,
int Direction>
217 #endif // EIGEN_REVERSE_H
internal::reverse_packet_cond< PacketScalar, ReversePacket > reverse_packet
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
const unsigned int LvalueBit
internal::dense_xpr_base< Reverse >::type Base
Namespace containing all symbols from the Eigen library.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedSegmentReturnType< internal::get_fixed_value< NType >::value >::Type tail(NType n)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type topRows(NRowsType n)
const unsigned int RowMajorBit
EIGEN_DEVICE_FUNC Reverse(const MatrixType &matrix)
static PacketType run(const PacketType &x)
traits< MatrixType >::StorageKind StorageKind
static void run(ExpressionType &xpr)
EIGEN_DEVICE_FUNC void reverseInPlace()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type bottomRows(NRowsType n)
traits< MatrixType >::XprKind XprKind
static PacketType run(const PacketType &x)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
static void run(ExpressionType &xpr)
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived)
remove_reference< MatrixTypeNested >::type _MatrixTypeNested
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
#define EIGEN_DEVICE_FUNC
EIGEN_DEVICE_FUNC Index innerStride() const
void reverse(const MatrixType &m)
MatrixType::Scalar Scalar
EIGEN_DEVICE_FUNC ReverseReturnType reverse()
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
ref_selector< MatrixType >::type MatrixTypeNested
EIGEN_DEVICE_FUNC void reverseInPlace()
EIGEN_DEVICE_FUNC const internal::remove_all< typename MatrixType::Nested >::type & nestedExpression() const
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Expression of the reverse of a vector or matrix.
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 NColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type rightCols(NColsType n)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type leftCols(NColsType n)
MatrixType::Nested m_matrix
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)