votca 2024-dev
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
votca::tools::Graph_BF_Visitor Class Reference

#include <graph_bf_visitor.h>

Inheritance diagram for votca::tools::Graph_BF_Visitor:
Inheritance graph
[legend]
Collaboration diagram for votca::tools::Graph_BF_Visitor:
Collaboration graph
[legend]

Public Member Functions

 Graph_BF_Visitor ()=default
 
bool queEmpty () const override
 
- Public Member Functions inherited from votca::tools::GraphVisitor
virtual void exploreNode (std::pair< Index, GraphNode > &vertex_and_node, Graph &graph, Edge edge=DUMMY_EDGE)
 Edge(0,0) is a dummy value.
 
 GraphVisitor ()=default
 
std::vector< IndexgetUnexploredVertex (const Edge edge) const
 Determine which vertices in the edge, if any, have not been explored.
 
virtual bool queEmpty () const
 
void setStartingVertex (Index vertex)
 
Index getStartingVertex () const
 
void initialize (Graph &graph)
 Initialize the graphvisitor the default starting point is 0.
 
virtual void exec (Graph &graph, Edge edge)
 
Edge nextEdge (Graph graph)
 
std::set< IndexgetExploredVertices () const
 Get the set of all the vertices that have been explored.
 
bool vertexExplored (const Index vertex) const
 Has the vertex been explored.
 

Private Member Functions

void addEdges_ (const Graph &graph, Index vertex) override
 
Edge getEdge_ () override
 

Private Attributes

std::deque< std::queue< Edge > > edge_que_
 

Additional Inherited Members

virtual void addEdges_ (const Graph &graph, Index vertex)=0
 What is done to an individual graph node as it is explored.
 
virtual Edge getEdge_ ()=0
 
- Protected Attributes inherited from votca::tools::GraphVisitor
std::set< Indexexplored_
 set containing all the vertix ids that have been explored
 
Index startingVertex_ = 0
 The vertex the visitor started on.
 

Detailed Description

Definition at line 41 of file graph_bf_visitor.h.

Constructor & Destructor Documentation

◆ Graph_BF_Visitor()

votca::tools::Graph_BF_Visitor::Graph_BF_Visitor ( )
default

Member Function Documentation

◆ addEdges_()

void votca::tools::Graph_BF_Visitor::addEdges_ ( const Graph graph,
Index  vertex 
)
overrideprivatevirtual

The core of the breadth first visitor is in how the edges are added to the queue in this function

Implements votca::tools::GraphVisitor.

Definition at line 43 of file graph_bf_visitor.cc.

◆ getEdge_()

Edge votca::tools::Graph_BF_Visitor::getEdge_ ( )
overrideprivatevirtual

Implements votca::tools::GraphVisitor.

Definition at line 33 of file graph_bf_visitor.cc.

◆ queEmpty()

bool votca::tools::Graph_BF_Visitor::queEmpty ( ) const
overridevirtual

Determine if the exploration is complete, this is determined by whether the edge queue is empty or not, it does not necessarily mean all vertices in a graph have been explored.

Reimplemented from votca::tools::GraphVisitor.

Definition at line 31 of file graph_bf_visitor.cc.

Member Data Documentation

◆ edge_que_

std::deque<std::queue<Edge> > votca::tools::Graph_BF_Visitor::edge_que_
private

Definition at line 43 of file graph_bf_visitor.h.


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