graph_analysis
BFSVisitor.hpp
Go to the documentation of this file.
1 #ifndef GRAPH_ANALYSIS_ALGORITHMS_BFS_VISITOR_HPP
2 #define GRAPH_ANALYSIS_ALGORITHMS_BFS_VISITOR_HPP
3 
4 #include "Visitor.hpp"
5 #include <base-logging/Logging.hpp>
6 
7 namespace graph_analysis {
8 namespace algorithms {
9 
14 class BFSVisitor : public Visitor
15 {
16 public:
17  typedef shared_ptr<BFSVisitor> Ptr;
18 
19  virtual void startVertex(Vertex::Ptr& vertex) { LOG_DEBUG_S << "startVertex" << vertex->toString(); }
20  virtual void initializeVertex(Vertex::Ptr& vertex) { LOG_DEBUG_S << "initializeVertex" << vertex->toString(); }
21  virtual void leafVertex(Vertex::Ptr& vertex) { LOG_DEBUG_S << "leafVertex" << vertex->toString(); }
25  virtual void discoverVertex(Vertex::Ptr& vertex) { LOG_DEBUG_S << "discoverVertex: " << vertex->toString(); }
26  virtual void finishVertex(Vertex::Ptr& vertex) { LOG_DEBUG_S << "finishVertex: " << vertex->toString(); }
27 
28 
29  virtual void examineEdge(Edge::Ptr& edge) { LOG_DEBUG_S << "examineEdge: " << edge->toString(); }
30  virtual void treeEdge(Edge::Ptr& edge) { LOG_DEBUG_S << "treeEdge: " << edge->toString(); }
31  virtual void forwardOrCrossEdge(Edge::Ptr& edge) { LOG_DEBUG_S << "forwardOrCrossEdge: " << edge->toString(); }
32  virtual void backEdge(Edge::Ptr& edge) { LOG_DEBUG_S << "backEdge: " << edge->toString(); }
33 
34 };
35 
36 } // end namespace algorithms
37 } // end namespace graph_analysis
38 #endif // GRAPH_ANALYSIS_ALGORITHMS_BFS_VISITOR_HPP
graph_analysis::algorithms::BFSVisitor::examineEdge
virtual void examineEdge(Edge::Ptr &edge)
Definition: BFSVisitor.hpp:29
graph_analysis::algorithms::BFSVisitor::Ptr
shared_ptr< BFSVisitor > Ptr
Definition: BFSVisitor.hpp:17
graph_analysis::algorithms::Visitor
Definition: Visitor.hpp:17
graph_analysis::algorithms::BFSVisitor::initializeVertex
virtual void initializeVertex(Vertex::Ptr &vertex)
Definition: BFSVisitor.hpp:20
graph_analysis
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
graph_analysis::Edge::Ptr
shared_ptr< Edge > Ptr
Definition: Edge.hpp:21
graph_analysis::algorithms::BFSVisitor::forwardOrCrossEdge
virtual void forwardOrCrossEdge(Edge::Ptr &edge)
Definition: BFSVisitor.hpp:31
graph_analysis::algorithms::BFSVisitor::discoverVertex
virtual void discoverVertex(Vertex::Ptr &vertex)
Definition: BFSVisitor.hpp:25
Visitor.hpp
graph_analysis::algorithms::BFSVisitor::treeEdge
virtual void treeEdge(Edge::Ptr &edge)
Definition: BFSVisitor.hpp:30
graph_analysis::algorithms::BFSVisitor::finishVertex
virtual void finishVertex(Vertex::Ptr &vertex)
Definition: BFSVisitor.hpp:26
graph_analysis::Vertex::Ptr
shared_ptr< Vertex > Ptr
Definition: Vertex.hpp:22
graph_analysis::algorithms::BFSVisitor
Special visitor for the BFS implementing the default functions.
Definition: BFSVisitor.hpp:14
graph_analysis::algorithms::BFSVisitor::startVertex
virtual void startVertex(Vertex::Ptr &vertex)
Definition: BFSVisitor.hpp:19
graph_analysis::algorithms::BFSVisitor::backEdge
virtual void backEdge(Edge::Ptr &edge)
Definition: BFSVisitor.hpp:32
graph_analysis::algorithms::BFSVisitor::leafVertex
virtual void leafVertex(Vertex::Ptr &vertex)
Definition: BFSVisitor.hpp:21