ampsci
High-precision calculations for one- and two-valence atomic systems
Loading...
Searching...
No Matches
qip::StrideIterator< T >

An iterator accounting for a stride. More...

#include <Array.hpp>

+ Inheritance diagram for qip::StrideIterator< T >:

Public Member Functions

 StrideIterator (T *ptr, long stride)
 
T & operator* ()
 
const T & operator* () const
 
bool operator== (const StrideIterator &other) const
 
bool operator< (const StrideIterator &other) const
 
StrideIteratoroperator++ ()
 
StrideIteratoroperator-- ()
 
StrideIterator operator++ (int)
 
StrideIterator operator-- (int)
 
StrideIteratoroperator+= (long n)
 
StrideIteratoroperator-= (long n)
 
StrideIterator operator+ (long n) const
 
StrideIterator operator- (long n) const
 

Protected Attributes

T * m_ptr
 
long m_stride
 

Detailed Description

template<typename T>
class qip::StrideIterator< T >

An iterator accounting for a stride.

  • Not completely complient to standard 'forward iterator', but works with most standard library algorithms.
  • Reverse iterators can be formed with a negative stride.

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