Eigen::Reverse< MatrixType, Direction > Class Template Reference

Expression of the reverse of a vector or matrix. More...

Inherits internal::dense_xpr_base::type.

Public Types

typedef internal::dense_xpr_base< Reverse >::type Base
 
typedef internal::remove_all_t< MatrixTypeNestedExpression
 

Public Member Functions

EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
Index innerStride () const
 
const internal::remove_all_t< typename MatrixType::Nested > & nestedExpression () const
 
 Reverse (const MatrixType &matrix)
 
EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 

Protected Types

enum  {
  PacketSize ,
  IsColMajor ,
  ReverseRow ,
  ReverseCol ,
  OffsetRow ,
  OffsetCol ,
  ReversePacket
}
 
typedef internal::reverse_packet_cond< PacketScalar, ReversePacketreverse_packet
 

Protected Attributes

MatrixType::Nested m_matrix
 

Detailed Description

template<typename MatrixType, int Direction>
class Eigen::Reverse< MatrixType, Direction >

Expression of the reverse of a vector or matrix.

Template Parameters
MatrixTypethe type of the object of which we are taking the reverse
Directiondefines the direction of the reverse operation, can be Vertical, Horizontal, or BothDirections

This class represents an expression of the reverse of a vector. It is the return type of MatrixBase::reverse() and VectorwiseOp::reverse() and most of the time this is the only way it is used.

See also
MatrixBase::reverse(), VectorwiseOp::reverse()

Definition at line 65 of file Reverse.h.

Member Typedef Documentation

◆ Base

template<typename MatrixType , int Direction>
typedef internal::dense_xpr_base<Reverse>::type Eigen::Reverse< MatrixType, Direction >::Base

Definition at line 70 of file Reverse.h.

◆ NestedExpression

template<typename MatrixType , int Direction>
typedef internal::remove_all_t<MatrixType> Eigen::Reverse< MatrixType, Direction >::NestedExpression

Definition at line 72 of file Reverse.h.

◆ reverse_packet

template<typename MatrixType , int Direction>
typedef internal::reverse_packet_cond<PacketScalar,ReversePacket> Eigen::Reverse< MatrixType, Direction >::reverse_packet
protected

Definition at line 87 of file Reverse.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename MatrixType , int Direction>
anonymous enum
protected
Enumerator
PacketSize 
IsColMajor 
ReverseRow 
ReverseCol 
OffsetRow 
OffsetCol 
ReversePacket 

Definition at line 76 of file Reverse.h.

76  {
78  IsColMajor = !IsRowMajor,
79  ReverseRow = (Direction == Vertical) || (Direction == BothDirections),
80  ReverseCol = (Direction == Horizontal) || (Direction == BothDirections),
82  OffsetCol = ReverseCol && IsRowMajor ? PacketSize : 1,
83  ReversePacket = (Direction == BothDirections)
84  || ((Direction == Vertical) && IsColMajor)
85  || ((Direction == Horizontal) && IsRowMajor)
86  };
@ BothDirections
Definition: Constants.h:272
@ Horizontal
Definition: Constants.h:269
@ Vertical
Definition: Constants.h:266

Constructor & Destructor Documentation

◆ Reverse()

template<typename MatrixType , int Direction>
Eigen::Reverse< MatrixType, Direction >::Reverse ( const MatrixType matrix)
inlineexplicit

Definition at line 90 of file Reverse.h.

90 : m_matrix(matrix) { }
MatrixType::Nested m_matrix
Definition: Reverse.h:111

Member Function Documentation

◆ cols()

template<typename MatrixType , int Direction>
EIGEN_CONSTEXPR Index Eigen::Reverse< MatrixType, Direction >::cols ( void  ) const
inline

Definition at line 97 of file Reverse.h.

97 { return m_matrix.cols(); }

◆ innerStride()

template<typename MatrixType , int Direction>
Index Eigen::Reverse< MatrixType, Direction >::innerStride ( ) const
inline

Definition at line 99 of file Reverse.h.

100  {
101  return -m_matrix.innerStride();
102  }

◆ nestedExpression()

template<typename MatrixType , int Direction>
const internal::remove_all_t<typename MatrixType::Nested>& Eigen::Reverse< MatrixType, Direction >::nestedExpression ( ) const
inline

Definition at line 105 of file Reverse.h.

106  {
107  return m_matrix;
108  }

◆ rows()

template<typename MatrixType , int Direction>
EIGEN_CONSTEXPR Index Eigen::Reverse< MatrixType, Direction >::rows ( void  ) const
inline

Definition at line 95 of file Reverse.h.

95 { return m_matrix.rows(); }

Member Data Documentation

◆ m_matrix

template<typename MatrixType , int Direction>
MatrixType::Nested Eigen::Reverse< MatrixType, Direction >::m_matrix
protected

Definition at line 111 of file Reverse.h.


The documentation for this class was generated from the following file: