![]() |
Pangolin
Header-only C++20 plane computational geometry library
|
Forward iterator over the undirected edges of a graph. More...
#include <graph.hpp>
Public Types | |
| using | iterator_category = std::input_iterator_tag |
| using | iterator_concept = std::forward_iterator_tag |
| using | difference_type = std::ptrdiff_t |
| using | value_type = EdgeType |
| using | reference = EdgeType |
Public Member Functions | |
| EdgeIterator ()=default | |
| Creates an iterator with no associated graph. | |
| reference | operator* () const |
| Returns the current edge, smaller endpoint first. | |
| EdgeIterator & | operator++ () |
| Advances to the next edge. | |
| EdgeIterator | operator++ (int) |
| Advances to the next edge and returns the previous position. | |
Friends | |
| class | Graph |
| bool | operator== (const EdgeIterator &, const EdgeIterator &)=default |
Forward iterator over the undirected edges of a graph.
Dereferencing yields an edge by value, as an EdgeType whose first vertex is the smaller of the two. The adjacency map holds both directions of every edge, so the iterator walks the adjacency sets and keeps only the direction that comes out increasing, visiting each edge once.
Requires a totally ordered VertexType, unlike the rest of the graph.
| using pgl::Graph< Vertex >::EdgeIterator::difference_type = std::ptrdiff_t |
| using pgl::Graph< Vertex >::EdgeIterator::iterator_category = std::input_iterator_tag |
| using pgl::Graph< Vertex >::EdgeIterator::iterator_concept = std::forward_iterator_tag |
| using pgl::Graph< Vertex >::EdgeIterator::reference = EdgeType |
| using pgl::Graph< Vertex >::EdgeIterator::value_type = EdgeType |
|
default |
Creates an iterator with no associated graph.
|
inline |
Returns the current edge, smaller endpoint first.
|
inline |
Advances to the next edge.
|
inline |
Advances to the next edge and returns the previous position.
|
friend |
|
friend |