21#ifndef gslpp_iterator_hh
22#define gslpp_iterator_hh
57 m_current += m_stride;
71 m_current -= m_stride;
84 m_current += dist * m_stride;
90 m_current -= dist * m_stride;
96 return m_current[idx * m_stride];
101 assert(m_stride == other.m_stride);
102 return (m_current - other.m_current) / m_stride;
107 assert(m_stride == other.m_stride);
108 return m_current == other.m_current;
113 assert(m_stride == other.m_stride);
114 return m_current != other.m_current;
119 assert(m_stride == other.m_stride);
120 return m_current < other.m_current;
125 assert(m_stride == other.m_stride);
126 return m_current <= other.m_current;
131 assert(m_stride == other.m_stride);
132 return m_current > other.m_current;
137 assert(m_stride == other.m_stride);
138 return m_current >= other.m_current;
180 m_current(base), m_stride(stride)
187 m_current(other.m_current),
188 m_stride(other.m_stride)
210 m_current += m_stride;
223 m_current -= m_stride;
236 m_current += dist * m_stride;
242 m_current -= dist * m_stride;
248 assert(m_stride == other.m_stride);
249 return (m_current - other.m_current) / m_stride;
254 return m_current[idx * m_stride];
259 assert(m_stride == other.m_stride);
260 return m_current == other.m_current;
265 assert(m_stride == other.m_stride);
266 return m_current != other.m_current;
271 assert(m_stride == other.m_stride);
272 return m_current < other.m_current;
277 assert(m_stride == other.m_stride);
278 return m_current <= other.m_current;
283 assert(m_stride == other.m_stride);
284 return m_current > other.m_current;
289 assert(m_stride == other.m_stride);
290 return m_current >= other.m_current;
295 const double *m_current;
327class iterator_traits<
gsl::const_vector_iterator >
338class iterator_traits<
gsl::vector_iterator >
difference_type operator-(const const_vector_iterator &other)
const_vector_iterator(const const_vector_iterator &other)=default
bool operator<=(const const_vector_iterator &other) const
bool operator>=(const const_vector_iterator &other) const
const_vector_iterator(const double *base, int stride)
const_vector_iterator & operator--()
const double * operator->() const
bool operator<(const const_vector_iterator &other) const
const double & operator[](int idx) const
const double & operator*() const
const_vector_iterator & operator++()
const_vector_iterator & operator-=(int dist)
bool operator!=(const const_vector_iterator &other) const
const_vector_iterator(const vector_iterator &other)
bool operator==(const const_vector_iterator &other) const
bool operator>(const const_vector_iterator &other) const
const_vector_iterator & operator+=(int dist)
bool operator==(const vector_iterator &other) const
bool operator>(const vector_iterator &other) const
vector_iterator(double *base, int stride)
vector_iterator & operator+=(int dist)
vector_iterator(const vector_iterator &other)=default
difference_type operator-(const vector_iterator &other)
vector_iterator & operator-=(int dist)
bool operator<=(const vector_iterator &other) const
vector_iterator & operator++()
bool operator!=(const vector_iterator &other) const
double & operator[](int idx)
vector_iterator & operator--()
bool operator>=(const vector_iterator &other) const
bool operator<(const vector_iterator &other) const
random_access_iterator_tag iterator_category
random_access_iterator_tag iterator_category
vector_iterator operator-(const vector_iterator &it, int dist)
vector_iterator operator+(const vector_iterator &it, int dist)