Eigen::internal::pointer_based_stl_iterator< XprType > Class Template Reference

#include <StlIterators.h>

Public Types

typedef Index difference_type
 
typedef XprType::Scalar value_type
 
typedef std::random_access_iterator_tag iterator_category
 
typedef std::conditional_t< bool(is_lvalue), value_type *, const value_type * > pointer
 
typedef std::conditional_t< bool(is_lvalue), value_type &, const value_type & > reference
 

Public Member Functions

 pointer_based_stl_iterator () EIGEN_NO_THROW
 
 pointer_based_stl_iterator (XprType &xpr, Index index) EIGEN_NO_THROW
 
 pointer_based_stl_iterator (const non_const_iterator &other) EIGEN_NO_THROW
 
pointer_based_stl_iteratoroperator= (const non_const_iterator &other) EIGEN_NO_THROW
 
reference operator* () const
 
reference operator[] (Index i) const
 
pointer operator-> () const
 
pointer_based_stl_iteratoroperator++ ()
 
pointer_based_stl_iteratoroperator-- ()
 
pointer_based_stl_iterator operator++ (int)
 
pointer_based_stl_iterator operator-- (int)
 
pointer_based_stl_iteratoroperator+= (Index b)
 
pointer_based_stl_iteratoroperator-= (Index b)
 
difference_type operator- (const pointer_based_stl_iterator &other) const
 
difference_type operator- (const other_iterator &other) const
 
bool operator== (const pointer_based_stl_iterator &other) const
 
bool operator!= (const pointer_based_stl_iterator &other) const
 
bool operator< (const pointer_based_stl_iterator &other) const
 
bool operator<= (const pointer_based_stl_iterator &other) const
 
bool operator> (const pointer_based_stl_iterator &other) const
 
bool operator>= (const pointer_based_stl_iterator &other) const
 
bool operator== (const other_iterator &other) const
 
bool operator!= (const other_iterator &other) const
 
bool operator< (const other_iterator &other) const
 
bool operator<= (const other_iterator &other) const
 
bool operator> (const other_iterator &other) const
 
bool operator>= (const other_iterator &other) const
 

Protected Attributes

pointer m_ptr
 
internal::variable_if_dynamic< Index, XprType::InnerStrideAtCompileTime > m_incr
 

Private Types

enum  { is_lvalue = internal::is_lvalue<XprType>::value }
 
typedef pointer_based_stl_iterator< std::remove_const_t< XprType > > non_const_iterator
 
typedef pointer_based_stl_iterator< std::add_const_t< XprType > > const_iterator
 
typedef std::conditional_t< internal::is_const< XprType >::value, non_const_iterator, const_iteratorother_iterator
 

Friends

class pointer_based_stl_iterator< std::add_const_t< XprType > >
 
class pointer_based_stl_iterator< std::remove_const_t< XprType > >
 
pointer_based_stl_iterator operator+ (const pointer_based_stl_iterator &a, Index b)
 
pointer_based_stl_iterator operator- (const pointer_based_stl_iterator &a, Index b)
 
pointer_based_stl_iterator operator+ (Index a, const pointer_based_stl_iterator &b)
 
pointer_based_stl_iterator operator- (Index a, const pointer_based_stl_iterator &b)
 

Member Typedef Documentation

◆ const_iterator

template<typename XprType >
typedef pointer_based_stl_iterator<std::add_const_t<XprType> > Eigen::internal::pointer_based_stl_iterator< XprType >::const_iterator
private

◆ difference_type

◆ iterator_category

template<typename XprType >
typedef std::random_access_iterator_tag Eigen::internal::pointer_based_stl_iterator< XprType >::iterator_category

◆ non_const_iterator

template<typename XprType >
typedef pointer_based_stl_iterator<std::remove_const_t<XprType> > Eigen::internal::pointer_based_stl_iterator< XprType >::non_const_iterator
private

◆ other_iterator

◆ pointer

template<typename XprType >
typedef std::conditional_t<bool(is_lvalue), value_type*, const value_type*> Eigen::internal::pointer_based_stl_iterator< XprType >::pointer

◆ reference

template<typename XprType >
typedef std::conditional_t<bool(is_lvalue), value_type&, const value_type&> Eigen::internal::pointer_based_stl_iterator< XprType >::reference

◆ value_type

Member Enumeration Documentation

◆ anonymous enum

template<typename XprType >
anonymous enum
private
Enumerator
is_lvalue 
@ is_lvalue
Definition: StlIterators.h:317
@ value
Definition: XprHelper.h:820

Constructor & Destructor Documentation

◆ pointer_based_stl_iterator() [1/3]

338 : m_ptr(0) {}
pointer m_ptr
Definition: StlIterators.h:427

◆ pointer_based_stl_iterator() [2/3]

template<typename XprType >
Eigen::internal::pointer_based_stl_iterator< XprType >::pointer_based_stl_iterator ( XprType xpr,
Index  index 
)
inline
339  : m_incr(xpr.innerStride()) {
340  m_ptr = xpr.data() + index * m_incr.value();
341  }
internal::variable_if_dynamic< Index, XprType::InnerStrideAtCompileTime > m_incr
Definition: StlIterators.h:428
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T value()
Definition: XprHelper.h:161

References Eigen::internal::pointer_based_stl_iterator< XprType >::m_incr, Eigen::internal::pointer_based_stl_iterator< XprType >::m_ptr, and Eigen::internal::variable_if_dynamic< T, Value >::value().

◆ pointer_based_stl_iterator() [3/3]

template<typename XprType >
Eigen::internal::pointer_based_stl_iterator< XprType >::pointer_based_stl_iterator ( const non_const_iterator other)
inline
343  : m_ptr(other.m_ptr),
344  m_incr(other.m_incr) {}

Member Function Documentation

◆ operator!=() [1/2]

template<typename XprType >
bool Eigen::internal::pointer_based_stl_iterator< XprType >::operator!= ( const other_iterator other) const
inline
420 { return m_ptr != other.m_ptr; }

References Eigen::internal::pointer_based_stl_iterator< XprType >::m_ptr.

◆ operator!=() [2/2]

template<typename XprType >
bool Eigen::internal::pointer_based_stl_iterator< XprType >::operator!= ( const pointer_based_stl_iterator< XprType > &  other) const
inline
413 { return m_ptr != other.m_ptr; }

References Eigen::internal::pointer_based_stl_iterator< XprType >::m_ptr.

◆ operator*()

template<typename XprType >
reference Eigen::internal::pointer_based_stl_iterator< XprType >::operator* ( ) const
inline

◆ operator++() [1/2]

◆ operator++() [2/2]

template<typename XprType >
pointer_based_stl_iterator Eigen::internal::pointer_based_stl_iterator< XprType >::operator++ ( int  )
inline
365  {
366  pointer_based_stl_iterator prev(*this);
367  operator++();
368  return prev;
369  }
pointer_based_stl_iterator() EIGEN_NO_THROW
Definition: StlIterators.h:338
pointer_based_stl_iterator & operator++()
Definition: StlIterators.h:356

References Eigen::internal::pointer_based_stl_iterator< XprType >::operator++().

◆ operator+=()

◆ operator-() [1/2]

◆ operator-() [2/2]

◆ operator--() [1/2]

◆ operator--() [2/2]

template<typename XprType >
pointer_based_stl_iterator Eigen::internal::pointer_based_stl_iterator< XprType >::operator-- ( int  )
inline
370  {
371  pointer_based_stl_iterator prev(*this);
372  operator--();
373  return prev;
374  }
pointer_based_stl_iterator & operator--()
Definition: StlIterators.h:360

References Eigen::internal::pointer_based_stl_iterator< XprType >::operator--().

◆ operator-=()

◆ operator->()

template<typename XprType >
pointer Eigen::internal::pointer_based_stl_iterator< XprType >::operator-> ( ) const
inline

◆ operator<() [1/2]

template<typename XprType >
bool Eigen::internal::pointer_based_stl_iterator< XprType >::operator< ( const other_iterator other) const
inline
421 { return m_ptr < other.m_ptr; }

References Eigen::internal::pointer_based_stl_iterator< XprType >::m_ptr.

◆ operator<() [2/2]

template<typename XprType >
bool Eigen::internal::pointer_based_stl_iterator< XprType >::operator< ( const pointer_based_stl_iterator< XprType > &  other) const
inline
414 { return m_ptr < other.m_ptr; }

References Eigen::internal::pointer_based_stl_iterator< XprType >::m_ptr.

◆ operator<=() [1/2]

template<typename XprType >
bool Eigen::internal::pointer_based_stl_iterator< XprType >::operator<= ( const other_iterator other) const
inline
422 { return m_ptr <= other.m_ptr; }

References Eigen::internal::pointer_based_stl_iterator< XprType >::m_ptr.

◆ operator<=() [2/2]

template<typename XprType >
bool Eigen::internal::pointer_based_stl_iterator< XprType >::operator<= ( const pointer_based_stl_iterator< XprType > &  other) const
inline
415 { return m_ptr <= other.m_ptr; }

References Eigen::internal::pointer_based_stl_iterator< XprType >::m_ptr.

◆ operator=()

template<typename XprType >
pointer_based_stl_iterator& Eigen::internal::pointer_based_stl_iterator< XprType >::operator= ( const non_const_iterator other)
inline
346  {
347  m_ptr = other.m_ptr;
348  m_incr.setValue(other.m_incr);
349  return *this;
350  }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T v) const
Definition: XprHelper.h:163

References Eigen::internal::pointer_based_stl_iterator< XprType >::m_incr, Eigen::internal::pointer_based_stl_iterator< XprType >::m_ptr, and Eigen::internal::variable_if_dynamic< T, Value >::setValue().

◆ operator==() [1/2]

template<typename XprType >
bool Eigen::internal::pointer_based_stl_iterator< XprType >::operator== ( const other_iterator other) const
inline
419 { return m_ptr == other.m_ptr; }

References Eigen::internal::pointer_based_stl_iterator< XprType >::m_ptr.

◆ operator==() [2/2]

template<typename XprType >
bool Eigen::internal::pointer_based_stl_iterator< XprType >::operator== ( const pointer_based_stl_iterator< XprType > &  other) const
inline
412 { return m_ptr == other.m_ptr; }

References Eigen::internal::pointer_based_stl_iterator< XprType >::m_ptr.

◆ operator>() [1/2]

template<typename XprType >
bool Eigen::internal::pointer_based_stl_iterator< XprType >::operator> ( const other_iterator other) const
inline
423 { return m_ptr > other.m_ptr; }

References Eigen::internal::pointer_based_stl_iterator< XprType >::m_ptr.

◆ operator>() [2/2]

template<typename XprType >
bool Eigen::internal::pointer_based_stl_iterator< XprType >::operator> ( const pointer_based_stl_iterator< XprType > &  other) const
inline
416 { return m_ptr > other.m_ptr; }

References Eigen::internal::pointer_based_stl_iterator< XprType >::m_ptr.

◆ operator>=() [1/2]

template<typename XprType >
bool Eigen::internal::pointer_based_stl_iterator< XprType >::operator>= ( const other_iterator other) const
inline
424 { return m_ptr >= other.m_ptr; }

References Eigen::internal::pointer_based_stl_iterator< XprType >::m_ptr.

◆ operator>=() [2/2]

template<typename XprType >
bool Eigen::internal::pointer_based_stl_iterator< XprType >::operator>= ( const pointer_based_stl_iterator< XprType > &  other) const
inline
417 { return m_ptr >= other.m_ptr; }

References Eigen::internal::pointer_based_stl_iterator< XprType >::m_ptr.

◆ operator[]()

Friends And Related Function Documentation

◆ operator+ [1/2]

template<typename XprType >
pointer_based_stl_iterator operator+ ( const pointer_based_stl_iterator< XprType > &  a,
Index  b 
)
friend
376  {
378  ret += b;
379  return ret;
380  }
Eigen::DenseIndex ret
Definition: level1_cplx_impl.h:43
const Scalar * a
Definition: level2_cplx_impl.h:32

◆ operator+ [2/2]

template<typename XprType >
pointer_based_stl_iterator operator+ ( Index  a,
const pointer_based_stl_iterator< XprType > &  b 
)
friend
386  {
388  ret += a;
389  return ret;
390  }

◆ operator- [1/2]

template<typename XprType >
pointer_based_stl_iterator operator- ( const pointer_based_stl_iterator< XprType > &  a,
Index  b 
)
friend
381  {
383  ret -= b;
384  return ret;
385  }

◆ operator- [2/2]

template<typename XprType >
pointer_based_stl_iterator operator- ( Index  a,
const pointer_based_stl_iterator< XprType > &  b 
)
friend
391  {
393  ret -= a;
394  return ret;
395  }

◆ pointer_based_stl_iterator< std::add_const_t< XprType > >

template<typename XprType >
friend class pointer_based_stl_iterator< std::add_const_t< XprType > >
friend

◆ pointer_based_stl_iterator< std::remove_const_t< XprType > >

template<typename XprType >
friend class pointer_based_stl_iterator< std::remove_const_t< XprType > >
friend

Member Data Documentation

◆ m_incr

◆ m_ptr


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