STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions
stapl::visitor_base< GRAPH > Class Template Reference

A base class to be inherited by every visitor class. More...

Public Member Functions

 visitor_base (GRAPH &)
 All the visitors will be related with a graph. This constructor can be used when you need to store the Graph associated with the current traversal/visitor. More...
 
virtual visitor_return discover_vertex (vertex_iterator)
 Will be called by the traversal when a vertex is reached for the first time. More...
 
virtual visitor_return examine_vertex (vertex_iterator)
 Will be called when a vertex is reached and needs to be examined. More...
 
virtual visitor_return examine_edge (vertex_iterator, adj_edge_iterator)
 Will be called when an edge is reached and needs to be examined. More...
 
virtual visitor_return tree_edge (vertex_iterator, adj_edge_iterator)
 Will be called when an edge whose destination is unvisited is reached. More...
 
virtual visitor_return non_tree_edge (vertex_iterator, adj_edge_iterator)
 Will be called when an edge whose destination is already visited is reached. More...
 
virtual visitor_return gray_target (vertex_iterator, adj_edge_iterator)
 Will be called when an edge is reached whose destination is visited but not finished. More...
 
virtual visitor_return black_target (vertex_iterator, adj_edge_iterator)
 Will be called when an edge is reached whose destination is visited and finished. More...
 
virtual visitor_return finish_vertex (vertex_iterator, int=-1)
 Will be called by traversal when a vertex becomes finished. More...
 
virtual ~visitor_base ()
 Destructor for the visitor_base class.
 

Detailed Description

template<class GRAPH>
class stapl::visitor_base< GRAPH >

A base class to be inherited by every visitor class.

Constructor & Destructor Documentation

◆ visitor_base()

template<class GRAPH>
stapl::visitor_base< GRAPH >::visitor_base ( GRAPH &  )

All the visitors will be related with a graph. This constructor can be used when you need to store the Graph associated with the current traversal/visitor.

Member Function Documentation

◆ discover_vertex()

template<class GRAPH>
virtual visitor_return stapl::visitor_base< GRAPH >::discover_vertex ( vertex_iterator  )
virtual

Will be called by the traversal when a vertex is reached for the first time.

Parameters
vIterator to the vertex.

◆ examine_vertex()

template<class GRAPH>
virtual visitor_return stapl::visitor_base< GRAPH >::examine_vertex ( vertex_iterator  )
virtual

Will be called when a vertex is reached and needs to be examined.

Parameters
vIterator to the vertex.

◆ examine_edge()

template<class GRAPH>
virtual visitor_return stapl::visitor_base< GRAPH >::examine_edge ( vertex_iterator  ,
adj_edge_iterator   
)
virtual

Will be called when an edge is reached and needs to be examined.

Parameters
vIterator to the starting vertex of the edge.
eIterator to the edge (edge data and destination vertex).

◆ tree_edge()

template<class GRAPH>
virtual visitor_return stapl::visitor_base< GRAPH >::tree_edge ( vertex_iterator  ,
adj_edge_iterator   
)
virtual

Will be called when an edge whose destination is unvisited is reached.

Parameters
vIterator to the starting vertex of the edge.
eIterator to the edge (edge data and destination vertex).

◆ non_tree_edge()

template<class GRAPH>
virtual visitor_return stapl::visitor_base< GRAPH >::non_tree_edge ( vertex_iterator  ,
adj_edge_iterator   
)
virtual

Will be called when an edge whose destination is already visited is reached.

Parameters
vIterator to the starting vertex of the edge.
eIterator to the edge (edge data and destination vertex).

◆ gray_target()

template<class GRAPH>
virtual visitor_return stapl::visitor_base< GRAPH >::gray_target ( vertex_iterator  ,
adj_edge_iterator   
)
virtual

Will be called when an edge is reached whose destination is visited but not finished.

Parameters
vIterator to the starting vertex of the edge.
eIterator to the edge (edge data and destination vertex).

Reimplemented in stapl::sequential::visitor_cycle< GRAPH >.

◆ black_target()

template<class GRAPH>
virtual visitor_return stapl::visitor_base< GRAPH >::black_target ( vertex_iterator  ,
adj_edge_iterator   
)
virtual

Will be called when an edge is reached whose destination is visited and finished.

Parameters
vIterator to the starting vertex of the edge.
eIterator to the edge (edge data and destination vertex).

Reimplemented in stapl::sequential::visitor_back_edges< GRAPH, Container >.

◆ finish_vertex()

template<class GRAPH>
virtual visitor_return stapl::visitor_base< GRAPH >::finish_vertex ( vertex_iterator  ,
int  = -1 
)
virtual

Will be called by traversal when a vertex becomes finished.

Parameters
vIterator to the vertex.

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