Easy3D 2.6.1
Loading...
Searching...
No Matches
Graph::VertexIterator Class Reference

This class iterates linearly over all vertices. More...

#include <graph.h>

Public Member Functions

 VertexIterator (Vertex v=Vertex(), const Graph *g=nullptr)
 Default constructor.
 
Vertex operator* () const
 Get the vertex the iterator refers to.
 
bool operator== (const VertexIterator &rhs) const
 Equality operator.
 
bool operator!= (const VertexIterator &rhs) const
 Inequality operator.
 
VertexIteratoroperator++ ()
 Pre-increment iterator.
 
VertexIteratoroperator-- ()
 Pre-decrement iterator.
 

Detailed Description

This class iterates linearly over all vertices.

See also
vertices_begin(), vertices_end()
EdgeIterator

Constructor & Destructor Documentation

◆ VertexIterator()

VertexIterator ( Vertex v = Vertex(),
const Graph * g = nullptr )
inlineexplicit

Default constructor.

Parameters
vThe vertex.
gThe graph.

Member Function Documentation

◆ operator!=()

bool operator!= ( const VertexIterator & rhs) const
inline

Inequality operator.

Parameters
rhsThe other iterator to compare with.
Returns
True if the iterators are different, false otherwise.

◆ operator*()

Vertex operator* ( ) const
inline

Get the vertex the iterator refers to.

Returns
The vertex.

◆ operator++()

VertexIterator & operator++ ( )
inline

Pre-increment iterator.

Returns
A reference to the incremented iterator.

◆ operator--()

VertexIterator & operator-- ( )
inline

Pre-decrement iterator.

Returns
A reference to the decremented iterator.

◆ operator==()

bool operator== ( const VertexIterator & rhs) const
inline

Equality operator.

Parameters
rhsThe other iterator to compare with.
Returns
True if the iterators are equal, false otherwise.

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