ROSE  0.11.96.11
Public Member Functions | List of all members
Sawyer::Container::Algorithm::DepthFirstForwardEdgeTraversal< Graph > Class Template Reference

Description

template<class Graph>
class Sawyer::Container::Algorithm::DepthFirstForwardEdgeTraversal< Graph >

Depth-first, forward traversal for edges.

This traversal follows edges in their natural order from source to target visiting child edges before siblings. The advancing methods and operators (advance, next, etc.) stop only at edge enter events (ENTER_EDGE). Dereferencing the traversal object returns a graph edge node.

Definition at line 1145 of file GraphTraversal.h.

#include <GraphTraversal.h>

Inheritance diagram for Sawyer::Container::Algorithm::DepthFirstForwardEdgeTraversal< Graph >:
Inheritance graph
[legend]
Collaboration diagram for Sawyer::Container::Algorithm::DepthFirstForwardEdgeTraversal< Graph >:
Collaboration graph
[legend]

Public Member Functions

 DepthFirstForwardEdgeTraversal (Graph &graph, typename GraphTraits< Graph >::VertexIterator startVertex)
 Start traversal at specified vertex.
 
 DepthFirstForwardEdgeTraversal (Graph &graph, typename GraphTraits< Graph >::EdgeIterator startEdge)
 Start traversal at specified edge.
 
 DepthFirstForwardEdgeTraversal (Graph &graph)
 Start traversal at edge number zero.
 
DepthFirstForwardEdgeTraversaloperator++ ()
 Advance traversal to next event.
 
- Public Member Functions inherited from Sawyer::Container::Algorithm::GraphEdgeTraversal< Graph, DepthFirstTraversalTag, ForwardTraversalTag >
GraphTraits< Graph >::EdgeIterator::Reference operator* ()
 Return reference to current edge.
 
GraphTraits< Graph >::EdgeIterator::Pointer operator-> ()
 Return pointer to current edge.
 
GraphTraits< Graph >::EdgeIterator::Reference next ()
 Return reference to current edge and advance.
 
- Public Member Functions inherited from Sawyer::Container::Algorithm::GraphTraversal< Graph, DepthFirstTraversalTag, ForwardTraversalTag >
 GraphTraversal (Graph &graph, unsigned significantEvents)
 Construct traversal for graph. More...
 
void start (VertexIterator startVertex)
 Restart the traversal at the specified vertex.
 
void start (EdgeIterator startEdge)
 Restart the traversal at the specified edge.
 
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...
 

Additional Inherited Members

- Public Types inherited from Sawyer::Container::Algorithm::GraphTraversal< Graph, DepthFirstTraversalTag, ForwardTraversalTag >
typedef Graph Graph
 
typedef GraphTraits< Graph >::VertexIterator VertexIterator
 Const or non-const vertex node iterator.
 
typedef GraphTraits< Graph >::EdgeIterator EdgeIterator
 Const or non-const edge node iterator.
 
- Protected Types inherited from Sawyer::Container::Algorithm::GraphTraversal< Graph, DepthFirstTraversalTag, ForwardTraversalTag >
typedef std::list< Work > WorkList
 
- Protected Member Functions inherited from Sawyer::Container::Algorithm::GraphEdgeTraversal< Graph, DepthFirstTraversalTag, ForwardTraversalTag >
 GraphEdgeTraversal (Graph &graph)
 
- Protected Member Functions inherited from Sawyer::Container::Algorithm::GraphTraversal< Graph, DepthFirstTraversalTag, ForwardTraversalTag >
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 ()
 
- Protected Attributes inherited from Sawyer::Container::Algorithm::GraphTraversal< Graph, DepthFirstTraversalTag, ForwardTraversalTag >
WorkList workList_
 

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