ArmNN
 24.08
TransformIterator< Function, Iterator, Category, T, Distance, Pointer, Reference > Class Template Reference

#include <TransformIterator.hpp>

Public Types

using iterator_category = Category
 
using value_type = T
 
using difference_type = Distance
 
using pointer = Pointer
 
using reference = Reference
 

Public Member Functions

 TransformIterator ()=default
 
 TransformIterator (TransformIterator const &transformIterator)=default
 
 TransformIterator (TransformIterator &&transformIterator)=default
 
 TransformIterator (Iterator &it, Function fn)
 
 TransformIterator (Iterator &&it, Function fn)
 
 ~TransformIterator ()=default
 
TransformIteratoroperator= (TransformIterator const &rhs)
 
TransformIteratoroperator= (TransformIterator &&rhs)
 
TransformIterator operator++ ()
 
TransformIterator operator-- ()
 
TransformIterator operator++ () const
 
TransformIterator operator-- () const
 
TransformIterator operator++ (int n) const
 
TransformIterator operator-- (int n) const
 
TransformIterator operator[] (Distance n) const
 
Distance operator- (const TransformIterator &other)
 
TransformIterator operator- (const Distance n)
 
TransformIterator operator+ (const Distance n)
 
bool operator> (const TransformIterator &rhs) const
 
bool operator< (const TransformIterator &rhs) const
 
bool operator>= (const TransformIterator &rhs) const
 
bool operator<= (const TransformIterator &rhs) const
 
bool operator== (TransformIterator other) const
 
bool operator!= (TransformIterator other) const
 
Reference operator* () const
 

Detailed Description

template<typename Function, typename Iterator, typename Category = typename std::iterator_traits<Iterator>::iterator_category, typename T = typename std::iterator_traits<Iterator>::value_type, typename Distance = typename std::iterator_traits<Iterator>::difference_type, typename Pointer = typename std::iterator_traits<Iterator>::pointer, typename Reference = typename std::result_of<const Function(typename std::iterator_traits<Iterator>::reference)>::type>
class armnn::TransformIterator< Function, Iterator, Category, T, Distance, Pointer, Reference >

Definition at line 25 of file TransformIterator.hpp.

Member Typedef Documentation

◆ difference_type

using difference_type = Distance

Definition at line 30 of file TransformIterator.hpp.

◆ iterator_category

using iterator_category = Category

Definition at line 28 of file TransformIterator.hpp.

◆ pointer

using pointer = Pointer

Definition at line 31 of file TransformIterator.hpp.

◆ reference

using reference = Reference

Definition at line 32 of file TransformIterator.hpp.

◆ value_type

using value_type = T

Definition at line 29 of file TransformIterator.hpp.

Constructor & Destructor Documentation

◆ TransformIterator() [1/5]

TransformIterator ( )
default

◆ TransformIterator() [2/5]

TransformIterator ( TransformIterator< Function, Iterator, Category, T, Distance, Pointer, Reference > const &  transformIterator)
default

◆ TransformIterator() [3/5]

TransformIterator ( TransformIterator< Function, Iterator, Category, T, Distance, Pointer, Reference > &&  transformIterator)
default

◆ TransformIterator() [4/5]

TransformIterator ( Iterator &  it,
Function  fn 
)
inline

Definition at line 39 of file TransformIterator.hpp.

39 : m_it(it), m_fn(fn) {}

◆ TransformIterator() [5/5]

TransformIterator ( Iterator &&  it,
Function  fn 
)
inline

Definition at line 40 of file TransformIterator.hpp.

40 : m_it(it), m_fn(fn) {}

◆ ~TransformIterator()

~TransformIterator ( )
default

Member Function Documentation

◆ operator!=()

bool operator!= ( TransformIterator< Function, Iterator, Category, T, Distance, Pointer, Reference >  other) const
inline

Definition at line 80 of file TransformIterator.hpp.

80 {return (m_it != other.m_it);}

◆ operator*()

Reference operator* ( ) const
inline

Definition at line 82 of file TransformIterator.hpp.

82 {return m_fn(*m_it);}

◆ operator+()

TransformIterator operator+ ( const Distance  n)
inline

Definition at line 72 of file TransformIterator.hpp.

72 {return {m_it + n, m_fn};}

◆ operator++() [1/3]

TransformIterator operator++ ( )
inline

Definition at line 58 of file TransformIterator.hpp.

58 {++m_it; return *this;}

◆ operator++() [2/3]

TransformIterator operator++ ( ) const
inline

Definition at line 61 of file TransformIterator.hpp.

61 {++m_it; return *this;}

◆ operator++() [3/3]

TransformIterator operator++ ( int  n) const
inline

Definition at line 64 of file TransformIterator.hpp.

64 {m_it += n; return *this;}

◆ operator-() [1/2]

TransformIterator operator- ( const Distance  n)
inline

Definition at line 71 of file TransformIterator.hpp.

71 {return {m_it - n, m_fn};}

◆ operator-() [2/2]

Distance operator- ( const TransformIterator< Function, Iterator, Category, T, Distance, Pointer, Reference > &  other)
inline

Definition at line 69 of file TransformIterator.hpp.

69 {return m_it - other.m_it;}

◆ operator--() [1/3]

TransformIterator operator-- ( )
inline

Definition at line 59 of file TransformIterator.hpp.

59 {--m_it; return *this;}

◆ operator--() [2/3]

TransformIterator operator-- ( ) const
inline

Definition at line 62 of file TransformIterator.hpp.

62 {--m_it; return *this;}

◆ operator--() [3/3]

TransformIterator operator-- ( int  n) const
inline

Definition at line 65 of file TransformIterator.hpp.

65 {m_it -= n; return *this;}

◆ operator<()

bool operator< ( const TransformIterator< Function, Iterator, Category, T, Distance, Pointer, Reference > &  rhs) const
inline

Definition at line 75 of file TransformIterator.hpp.

75 {return m_it < rhs.m_it;}

◆ operator<=()

bool operator<= ( const TransformIterator< Function, Iterator, Category, T, Distance, Pointer, Reference > &  rhs) const
inline

Definition at line 77 of file TransformIterator.hpp.

77 {return m_it <= rhs.m_it;}

◆ operator=() [1/2]

TransformIterator& operator= ( TransformIterator< Function, Iterator, Category, T, Distance, Pointer, Reference > &&  rhs)
inline

Definition at line 51 of file TransformIterator.hpp.

52  {
53  m_fn = std::move(rhs.m_fn);
54  m_it = std::move(rhs.m_it);
55  return *this;
56  }

◆ operator=() [2/2]

TransformIterator& operator= ( TransformIterator< Function, Iterator, Category, T, Distance, Pointer, Reference > const &  rhs)
inline

Definition at line 44 of file TransformIterator.hpp.

45  {
46  m_fn = rhs.m_fn;
47  m_it = rhs.m_it;
48  return *this;
49  }

◆ operator==()

bool operator== ( TransformIterator< Function, Iterator, Category, T, Distance, Pointer, Reference >  other) const
inline

Definition at line 79 of file TransformIterator.hpp.

79 {return (m_it == other.m_it);}

◆ operator>()

bool operator> ( const TransformIterator< Function, Iterator, Category, T, Distance, Pointer, Reference > &  rhs) const
inline

Definition at line 74 of file TransformIterator.hpp.

74 {return m_it > rhs.m_it;}

◆ operator>=()

bool operator>= ( const TransformIterator< Function, Iterator, Category, T, Distance, Pointer, Reference > &  rhs) const
inline

Definition at line 76 of file TransformIterator.hpp.

76 {return m_it >= rhs.m_it;}

◆ operator[]()

TransformIterator operator[] ( Distance  n) const
inline

Definition at line 67 of file TransformIterator.hpp.

67 {m_it[n]; return *this;};

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