Constant iterator to vector coordinates. More...
#include <geo_vectors_utils.h>
Public Types | |
using | iterator_t = CoordConstIterator< Vector > |
Type of this iterator. More... | |
Iterator traits | |
— BEGIN Iterator traits ---------------------------------------------— | |
using | value_type = std::remove_cv_t< Coord_t > |
using | difference_type = std::ptrdiff_t |
using | reference = Coord_t |
using | pointer = Coord_t const * |
using | iterator_category = std::random_access_iterator_tag |
Public Member Functions | |
CoordConstIterator ()=default | |
Default constructor: invalid iterator. More... | |
CoordConstIterator (Vector &v, unsigned int index=0) | |
Constructor: points to index coordinate of vector v . More... | |
Access | |
reference | operator* () const |
Access the current coordinate. More... | |
reference | operator[] (difference_type n) const |
Access the current coordinate. More... | |
Moving | |
iterator_t & | operator++ () |
Points to the next coordinate (unchecked). More... | |
iterator_t | operator++ (int) |
Points to the next coordinate (unchecked), returns the previous iterator. More... | |
iterator_t & | operator-- () |
Points to the previous coordinate (unchecked). More... | |
iterator_t | operator-- (int) |
Points to previous coordinate (unchecked), returns the previous iterator. More... | |
iterator_t & | operator+= (difference_type d) |
Increments the iterator by d positions (unchecked). More... | |
iterator_t | operator+ (difference_type d) const |
Returns an iterator incremented by d positions (unchecked). More... | |
iterator_t & | operator-= (difference_type d) |
Decrements the iterator by d positions (unchecked). More... | |
iterator_t | operator- (difference_type d) const |
Returns an iterator decremented by d positions (unchecked). More... | |
iterator_t | operator- (iterator_t const &other) const |
Returns the distance from another iterator. More... | |
Comparison operators | |
All comparisons between iterators on different vectors fail. | |
bool | operator== (iterator_t const &other) const |
bool | operator!= (iterator_t const &other) const |
bool | operator<= (iterator_t const &other) const |
bool | operator>= (iterator_t const &other) const |
bool | operator< (iterator_t const &other) const |
bool | operator> (iterator_t const &other) const |
Private Types | |
using | Vector_t = Vector |
using | Coord_t = geo::vect::coordinate_t< Vector_t > |
Type of vector coordinate. More... | |
Private Member Functions | |
decltype(auto) | access (unsigned int c) const |
iterator_t | copy () const |
Private Attributes | |
Vector * | v = nullptr |
unsigned int | index = std::numeric_limits<unsigned int>::max() |
Constant iterator to vector coordinates.
Vector | the type of vector being iterated |
vector_cbegin()
, vector_cend()
, iterateCoords()
Definition at line 918 of file geo_vectors_utils.h.
|
private |
Type of vector coordinate.
Definition at line 926 of file geo_vectors_utils.h.
using geo::vect::CoordConstIterator< Vector >::difference_type = std::ptrdiff_t |
Definition at line 942 of file geo_vectors_utils.h.
using geo::vect::CoordConstIterator< Vector >::iterator_category = std::random_access_iterator_tag |
Definition at line 945 of file geo_vectors_utils.h.
using geo::vect::CoordConstIterator< Vector >::iterator_t = CoordConstIterator<Vector> |
Type of this iterator.
Definition at line 921 of file geo_vectors_utils.h.
using geo::vect::CoordConstIterator< Vector >::pointer = Coord_t const* |
Definition at line 944 of file geo_vectors_utils.h.
using geo::vect::CoordConstIterator< Vector >::reference = Coord_t |
Definition at line 943 of file geo_vectors_utils.h.
using geo::vect::CoordConstIterator< Vector >::value_type = std::remove_cv_t<Coord_t> |
Definition at line 941 of file geo_vectors_utils.h.
|
private |
Type of vector being iterated.
Definition at line 924 of file geo_vectors_utils.h.
|
default |
Default constructor: invalid iterator.
— END Iterator traits --------------------------------------------——
|
inline |
Constructor: points to index
coordinate of vector v
.
Definition at line 953 of file geo_vectors_utils.h.
|
inlineprivate |
Definition at line 931 of file geo_vectors_utils.h.
|
inlineprivate |
Definition at line 934 of file geo_vectors_utils.h.
|
inline |
Definition at line 1017 of file geo_vectors_utils.h.
|
inline |
Access the current coordinate.
Definition at line 962 of file geo_vectors_utils.h.
|
inline |
Returns an iterator incremented by d
positions (unchecked).
Definition at line 992 of file geo_vectors_utils.h.
|
inline |
|
inline |
Points to the next coordinate (unchecked), returns the previous iterator.
Definition at line 980 of file geo_vectors_utils.h.
|
inline |
Increments the iterator by d
positions (unchecked).
Definition at line 989 of file geo_vectors_utils.h.
|
inline |
Returns an iterator decremented by d
positions (unchecked).
Definition at line 998 of file geo_vectors_utils.h.
|
inline |
Returns the distance from another iterator.
Definition at line 1001 of file geo_vectors_utils.h.
|
inline |
|
inline |
Points to previous coordinate (unchecked), returns the previous iterator.
Definition at line 986 of file geo_vectors_utils.h.
|
inline |
Decrements the iterator by d
positions (unchecked).
Definition at line 995 of file geo_vectors_utils.h.
|
inline |
Definition at line 1026 of file geo_vectors_utils.h.
|
inline |
Definition at line 1020 of file geo_vectors_utils.h.
|
inline |
Definition at line 1014 of file geo_vectors_utils.h.
|
inline |
Definition at line 1029 of file geo_vectors_utils.h.
|
inline |
Definition at line 1023 of file geo_vectors_utils.h.
|
inline |
Access the current coordinate.
Definition at line 965 of file geo_vectors_utils.h.
|
private |
Definition at line 929 of file geo_vectors_utils.h.
|
private |
Definition at line 928 of file geo_vectors_utils.h.