CGRA-ME
Public Member Functions | List of all members
DoNothingGraphVisitor< VertexID > Class Template Reference

#include <GraphAlgorithmHelpers.h>

Inheritance diagram for DoNothingGraphVisitor< VertexID >:
DebugVisitor< VertexID, Base, OStream > EventRecordingVisitor< VertexID, Base > IgnoreEdgeSetVisitor< VertexID, Base, EdgeSet > IgnoreVertexSetVisitor< VertexID, Base, NodeSet >

Public Member Functions

void onExamine (const VertexID &)
 
void onExamineEdge (const VertexID &, const VertexID &)
 
bool shouldIgnore (const VertexID &)
 
bool shouldIgnoreEdge (const VertexID &, const VertexID &)
 
void onSkipped (const VertexID &)
 
void onSkippedEdge (const VertexID &, const VertexID &)
 
void onWaveEnd ()
 
bool shouldStop ()
 

Detailed Description

template<typename VertexID>
class DoNothingGraphVisitor< VertexID >

A visitor that... does nothing! Mostly just a useful base class to inherit your own visitors from - it implements all required callbacks, but they do nothing and don't affect the graph visit in any way. This way, you only have to implement the callbacks that you want to implement. Also, this is where all the callback documentation is.

Definition at line 49 of file GraphAlgorithmHelpers.h.

Member Function Documentation

◆ onExamine()

template<typename VertexID >
void DoNothingGraphVisitor< VertexID >::onExamine ( const VertexID &  )
inline

The premier visitation function. Is called once per vertex in the visitation order specified by the algorithm.

Definition at line 55 of file GraphAlgorithmHelpers.h.

◆ onExamineEdge()

template<typename VertexID >
void DoNothingGraphVisitor< VertexID >::onExamineEdge ( const VertexID &  ,
const VertexID &   
)
inline

Called every time an edge is examined.

Definition at line 60 of file GraphAlgorithmHelpers.h.

◆ onSkipped()

template<typename VertexID >
void DoNothingGraphVisitor< VertexID >::onSkipped ( const VertexID &  )
inline

If a vertex is discovered but is ignored or already examined, this function is called. Distinguishing between either case can be done by calling your shouldIgnore function Between this function and onExamine, all vertices that an algorithm discovers will be called by one function or the other.

Definition at line 78 of file GraphAlgorithmHelpers.h.

◆ onSkippedEdge()

template<typename VertexID >
void DoNothingGraphVisitor< VertexID >::onSkippedEdge ( const VertexID &  ,
const VertexID &   
)
inline

If an edge is discovered, but it was ignored, or the fanout was already examined, or the fanout itself was ignored, this function is called. Distinguishing between these cases can be done by calling your shouldIgnore and/or shouldIgnoreEdge functions Between this function and onExamineEdge, all edges that an algorithm discovers will be called by one function or the other.

Definition at line 88 of file GraphAlgorithmHelpers.h.

◆ onWaveEnd()

template<typename VertexID >
void DoNothingGraphVisitor< VertexID >::onWaveEnd ( )
inline

If implemented by the algorithm, is called at the end of every expansion wave.

Definition at line 93 of file GraphAlgorithmHelpers.h.

◆ shouldIgnore()

template<typename VertexID >
bool DoNothingGraphVisitor< VertexID >::shouldIgnore ( const VertexID &  )
inline

Should this vertex be treated as if it doesn't exist?

Definition at line 65 of file GraphAlgorithmHelpers.h.

◆ shouldIgnoreEdge()

template<typename VertexID >
bool DoNothingGraphVisitor< VertexID >::shouldIgnoreEdge ( const VertexID &  ,
const VertexID &   
)
inline

Should this edge be treated as if it doesn't exist?

Definition at line 70 of file GraphAlgorithmHelpers.h.

◆ shouldStop()

template<typename VertexID >
bool DoNothingGraphVisitor< VertexID >::shouldStop ( )
inline

Asynchronously stop the algorithm. Called periodically, with no specific guarantees – other callbacks may be called after this would evaluate to true. So, you should disable them with a boolean flag, or something.

Definition at line 101 of file GraphAlgorithmHelpers.h.


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