ROSE  0.9.10.2
Public Member Functions | Protected Member Functions | List of all members
Sawyer::Container::Algorithm::GraphVertexTraversal< Graph, Order, Direction > Class Template Reference

Description

template<class Graph, class Order, class Direction>
class Sawyer::Container::Algorithm::GraphVertexTraversal< Graph, Order, Direction >

Base class for graph vertex traversals.

Vertex traversals increment their current position stopping only when a vertex is entered. They have dereference ("*") and arrow ("->") operators and a next method that return vertex nodes from the graph.

Definition at line 950 of file GraphTraversal.h.

#include <GraphTraversal.h>

Inheritance diagram for Sawyer::Container::Algorithm::GraphVertexTraversal< Graph, Order, Direction >:
Inheritance graph
[legend]
Collaboration diagram for Sawyer::Container::Algorithm::GraphVertexTraversal< Graph, Order, Direction >:
Collaboration graph
[legend]

Public Member Functions

GraphTraits< Graph >
::VertexIterator::Reference 
operator* ()
 Return reference to current vertex. More...
 
GraphTraits< Graph >
::VertexIterator::Pointer 
operator-> ()
 Return pointer to current vertex. More...
 
GraphTraits< Graph >
::VertexIterator::Reference 
next ()
 Return reference to current vertex and advance. More...
 
- Public Member Functions inherited from Sawyer::Container::Algorithm::GraphTraversal< Graph, Order, Direction >
 GraphTraversal (Graph &graph, unsigned significantEvents)
 Construct traversal for graph. More...
 
void start (VertexIterator startVertex)
 Restart the traversal at the specified vertex. More...
 
void start (EdgeIterator startEdge)
 Restart the traversal at the specified edge. More...
 
Graph & graph () const
 The graph over which iteration occurs. More...
 
TraversalEvent event () const
 Current event on which traversal is stopped. More...
 
VertexIterator vertex () const
 Vertex to which traversal is pointing. More...
 
EdgeIterator edge () const
 Edge to which traversal is pointing. More...
 
bool isAtEnd () const
 Returns true when traversal reaches the end. More...
 
bool hasNext () const
 Returns true when a traversal can be advanced. More...
 
TraversalEvent advance ()
 Advance traversal to next interesting event. More...
 
void skipChildren ()
 Causes traversal to skip children. More...
 
void allowRediscovery (VertexIterator vertex)
 Allow a vertex to be discovered again. More...
 
bool isDiscovered (VertexIterator vertex) const
 True if the vertex has been discovered. More...
 
bool isVisited (EdgeIterator edge) const
 True if the edge has been entered. More...
 
 operator unspecified_bool () const
 Type for Boolean context. More...
 
void mapVertices (Functor &f)
 Call the specified functor for each vertex. More...
 
void mapVertices (const Functor &f)
 Call the specified functor for each vertex. More...
 
void mapEdges (Functor &f)
 Call the specified functor for each edge. More...
 
void mapEdges (const Functor &f)
 Call the specified functor for each edge. More...
 

Protected Member Functions

 GraphVertexTraversal (Graph &graph)
 
- Protected Member Functions inherited from Sawyer::Container::Algorithm::GraphTraversal< Graph, Order, Direction >
Work & current ()
 
const Work & current () const
 
bool isSignificant (TraversalEvent event) const
 
void setDiscovered (VertexIterator vertex, bool isDiscovered=true)
 
void setVisited (EdgeIterator edge, bool isVisited=true)
 
void clear ()
 

Additional Inherited Members

- Public Types inherited from Sawyer::Container::Algorithm::GraphTraversal< Graph, Order, Direction >
typedef Graph Graph
 
typedef GraphTraits< Graph >
::VertexIterator 
VertexIterator
 Const or non-const vertex node iterator. More...
 
typedef GraphTraits< Graph >
::EdgeIterator 
EdgeIterator
 Const or non-const edge node iterator. More...
 
- Protected Types inherited from Sawyer::Container::Algorithm::GraphTraversal< Graph, Order, Direction >
typedef std::list< Work > WorkList
 
- Protected Attributes inherited from Sawyer::Container::Algorithm::GraphTraversal< Graph, Order, Direction >
WorkList workList_
 

Member Function Documentation

template<class Graph, class Order, class Direction>
GraphTraits<Graph>::VertexIterator::Reference Sawyer::Container::Algorithm::GraphVertexTraversal< Graph, Order, Direction >::operator* ( )
inline

Return reference to current vertex.

Definition at line 956 of file GraphTraversal.h.

template<class Graph, class Order, class Direction>
GraphTraits<Graph>::VertexIterator::Pointer Sawyer::Container::Algorithm::GraphVertexTraversal< Graph, Order, Direction >::operator-> ( )
inline

Return pointer to current vertex.

Definition at line 961 of file GraphTraversal.h.

template<class Graph, class Order, class Direction>
GraphTraits<Graph>::VertexIterator::Reference Sawyer::Container::Algorithm::GraphVertexTraversal< Graph, Order, Direction >::next ( )
inline

Return reference to current vertex and advance.

Definition at line 966 of file GraphTraversal.h.


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