Documentation
template<typename T, typename Container>
class TiledArray::detail::RangeIterator< T, Container >
Coordinate index iterate.
This is an input iterator that is used to iterate over the coordinate indexes of a Range
.
- Template Parameters
-
T The value type of the iterator Container The container that the iterator references
- Note
- The container object must define the function
Container::increment(T&)
const
, and be accessible toRangeIterator
.
Definition at line 62 of file range_iterator.h.
Public Types | |
typedef RangeIterator< T, Container > | RangeIterator_ |
This class type. More... | |
typedef Container::index_type | value_type |
Iterator value type. More... | |
typedef const value_type & | reference |
Iterator reference type. More... | |
typedef const value_type * | pointer |
Iterator pointer type. More... | |
typedef std::input_iterator_tag | iterator_category |
typedef std::ptrdiff_t | difference_type |
Iterator category tag. More... | |
Public Member Functions | |
RangeIterator (const RangeIterator_ &other) | |
Copy constructor. More... | |
RangeIterator (const T *v, const Container *c) | |
Construct an index iterator. More... | |
RangeIterator_ & | operator= (const RangeIterator_ &other) |
Copy constructor. More... | |
const Container * | container () const |
reference | operator* () const |
Dereference operator. More... | |
RangeIterator_ & | operator++ () |
Increment operator. More... | |
RangeIterator_ | operator++ (int) |
Increment operator. More... | |
pointer | operator-> () const |
Pointer operator. More... | |
void | advance (difference_type n) |
difference_type | distance_to (const RangeIterator_ &other) const |
Friends | |
template<typename U , typename C > | |
bool | operator== (const RangeIterator< U, C > &left_it, const RangeIterator< U, C > &right_it) |
Member Typedef Documentation
◆ difference_type
typedef std::ptrdiff_t TiledArray::detail::RangeIterator< T, Container >::difference_type |
◆ iterator_category
typedef std::input_iterator_tag TiledArray::detail::RangeIterator< T, Container >::iterator_category |
Definition at line 70 of file range_iterator.h.
◆ pointer
typedef const value_type* TiledArray::detail::RangeIterator< T, Container >::pointer |
Iterator pointer type.
Definition at line 69 of file range_iterator.h.
◆ RangeIterator_
typedef RangeIterator<T, Container> TiledArray::detail::RangeIterator< T, Container >::RangeIterator_ |
This class type.
Definition at line 64 of file range_iterator.h.
◆ reference
typedef const value_type& TiledArray::detail::RangeIterator< T, Container >::reference |
Iterator reference type.
Definition at line 68 of file range_iterator.h.
◆ value_type
typedef Container::index_type TiledArray::detail::RangeIterator< T, Container >::value_type |
Iterator value type.
Definition at line 67 of file range_iterator.h.
Constructor & Destructor Documentation
◆ RangeIterator() [1/2]
|
inline |
Copy constructor.
- Parameters
-
other The other iterator to be copied
Definition at line 76 of file range_iterator.h.
◆ RangeIterator() [2/2]
|
inline |
Construct an index iterator.
- Parameters
-
v The initial value of the iterator index c The container that the iterator will reference
Definition at line 83 of file range_iterator.h.
Member Function Documentation
◆ advance()
|
inline |
◆ container()
|
inline |
◆ distance_to()
|
inline |
◆ operator*()
|
inline |
Dereference operator.
- Returns
- A
reference
to the current data
- Note
- this asserts that the iterator is valid
Definition at line 103 of file range_iterator.h.
◆ operator++() [1/2]
|
inline |
Increment operator.
Increment the iterator
- Returns
- The modified iterator
Definition at line 112 of file range_iterator.h.
◆ operator++() [2/2]
|
inline |
Increment operator.
Increment the iterator
- Returns
- An unmodified copy of the iterator
Definition at line 122 of file range_iterator.h.
◆ operator->()
|
inline |
Pointer operator.
- Returns
- A
pointer
to the current data
Definition at line 132 of file range_iterator.h.
◆ operator=()
|
inline |
Copy constructor.
- Parameters
-
other The other iterator to be copied
- Returns
- A reference to this object
Definition at line 90 of file range_iterator.h.
Friends And Related Function Documentation
◆ operator==
|
friend |
The documentation for this class was generated from the following file:
- TiledArray/range_iterator.h