MCPcopy Create free account
hub / github.com/BirolLab/abyss / vertex_iterator

Class vertex_iterator

Graph/DirectedGraph.h:54–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53/** Iterate through the vertices of this graph. */
54class vertex_iterator
55 : public std::iterator<std::input_iterator_tag,
56 const vertex_descriptor>
57{
58 public:
59 vertex_iterator() { }
60 explicit vertex_iterator(vertices_size_type v) : m_v(v) { }
61 const vertex_descriptor& operator *() const { return m_v; }
62
63 bool operator ==(const vertex_iterator& it) const
64 {
65 return m_v == it.m_v;
66 }
67
68 bool operator !=(const vertex_iterator& it) const
69 {
70 return m_v != it.m_v;
71 }
72
73 vertex_iterator& operator ++() { ++m_v; return *this; }
74 vertex_iterator operator ++(int)
75 {
76 vertex_iterator it = *this;
77 ++*this;
78 return it;
79 }
80
81 private:
82 vertex_descriptor m_v;
83};
84
85/** Iterate through the out-edges. */
86class out_edge_iterator

Callers 1

verticesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected