graph_analysis
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
graph_analysis::VertexIterator Class Reference

VertexIterator interface Allows to access all vertices of a graph. Requires implementation to wrap the underlyning graph library in use. More...

#include <VertexIterator.hpp>

Inheritance diagram for graph_analysis::VertexIterator:
Inheritance graph
[legend]

Public Types

typedef shared_ptr< VertexIterator > Ptr
 
typedef function1< bool, const Vertex::Ptr & > SkipFunction
 

Public Member Functions

virtual ~VertexIterator ()
 
virtual bool next ()
 Test if there is a next item and if it is then updates the current to next. More...
 
const Vertex::Ptr & current ()
 

Protected Member Functions

bool skip (const Vertex::Ptr &vertex) const
 
void setNext (const Vertex::Ptr &vertex)
 Set next vertex Should be applied by class implementing next() More...
 
void setSkipFunction (SkipFunction skipFunction)
 

Friends

class SubGraph
 

Detailed Description

VertexIterator interface Allows to access all vertices of a graph. Requires implementation to wrap the underlyning graph library in use.

Member Typedef Documentation

◆ Ptr

◆ SkipFunction

Constructor & Destructor Documentation

◆ ~VertexIterator()

virtual graph_analysis::VertexIterator::~VertexIterator ( )
inlinevirtual

Member Function Documentation

◆ current()

const Vertex::Ptr& graph_analysis::VertexIterator::current ( )
inline

Retrieve the current vertex this iterator is pointing to

◆ next()

virtual bool graph_analysis::VertexIterator::next ( )
inlinevirtual

Test if there is a next item and if it is then updates the current to next.

Exceptions
std::runtime_errorif not implemented by subclass

Reimplemented in graph_analysis::boost_graph::NodeIterator< T >, graph_analysis::lemon::NodeIterator< T >, and graph_analysis::snap::NodeIterator< T >.

◆ setNext()

void graph_analysis::VertexIterator::setNext ( const Vertex::Ptr &  vertex)
inlineprotected

Set next vertex Should be applied by class implementing next()

◆ setSkipFunction()

void graph_analysis::VertexIterator::setSkipFunction ( SkipFunction  skipFunction)
inlineprotected

Allows to set a skip function

◆ skip()

bool graph_analysis::VertexIterator::skip ( const Vertex::Ptr &  vertex) const
protected

Check if vertex should be skipped

Returns
True if vertex should be skipped, false otherwise

Friends And Related Function Documentation

◆ SubGraph

friend class SubGraph
friend

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