|
linbox
|
Subvector iterator class provides striding iterators. More...
#include <subiterator.h>
Public Types | |
| typedef std::iterator_traits< Iterator >::iterator_category | iterator_category |
| typedef std::iterator_traits< Iterator >::value_type | value_type |
| typedef std::iterator_traits< Iterator >::difference_type | difference_type |
| typedef std::iterator_traits< Iterator >::pointer | pointer |
| typedef std::iterator_traits< Iterator >::reference | reference |
Protected Attributes | |
| Iterator | _iter |
| difference_type | _stride |
Subvector iterator class provides striding iterators.
A Subiterator steps by a fixed stride thru the underlying container. Subiter<Iterator> requires that Iterator be a random access iterator class and then itself provides the full functionality of a random access iterator class. See STL documentation for that functionality. Documented here is only the constructor from (1) an iterator of an underlying container and (2) a stride amount.
| typedef std::iterator_traits<Iterator>::iterator_category iterator_category |
| typedef std::iterator_traits<Iterator>::value_type value_type |
| typedef std::iterator_traits<Iterator>::difference_type difference_type |
| typedef std::iterator_traits<Iterator>::pointer pointer |
| typedef std::iterator_traits<Iterator>::reference reference |
|
inline |
|
inline |
Constructors.
Subiterator p (pp, 3) provides an iterator which initially has the same reference, but for which increments and offsets step by the amount stride rather than 1. Thus p+k is equivalent to pp+(stride*k).
Striding iterators are easily positioned beyond the bounds of the underlying container. It is up to the user to dereference the iterator only when it has a valid reference.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
wrapped iterator
|
protected |
length between iterations