KrisLibrary
1.0.0
|
A specialization of a Graph to be directed graph. More...
#include <DirectedGraph.h>
Public Types | |
typedef Graph< Node, Edge > | P |
typedef EdgeIterator< Edge > | ForwardIterator |
typedef EdgeIterator< Edge > | ReverseIterator |
Public Types inherited from Graph::Graph< Node, Edge > | |
typedef CallbackBase< int > | Callback |
typedef std::list< Edge >::iterator | EdgeDataPtr |
typedef std::map< int, EdgeDataPtr > | EdgeList |
typedef std::map< int, EdgeDataPtr > | CoEdgeList |
typedef EdgeList::iterator | EdgeListIterator |
typedef CoEdgeList::iterator | CoEdgeListIterator |
typedef EdgeList::const_iterator | ConstEdgeListIterator |
Public Member Functions | |
void | DFS (CallbackBase< Node > &f) |
void | DFSReverse (CallbackBase< Node > &f) |
void | SimpleDFS (CallbackBase< Node > &f) |
void | SimpleBFS (CallbackBase< Node > &f) |
void | GuidedDFS (CallbackBase< Node > &f) |
void | GuidedBFS (CallbackBase< Node > &f) |
bool | HasDescendent (int n, int d) |
bool | HasAncestor (int n, int a) |
std::list< int > | TopologicalSort () |
bool | HasCycle () |
Public Member Functions inherited from Graph::Graph< Node, Edge > | |
void | Resize (int n) |
void | Cleanup () |
bool | IsValid () const |
void | Copy (const Graph< Node, Edge > &g) |
void | SetTranspose (const Graph< Node, Edge > &g) |
int | NumNodes () const |
int | AddNode (const Node &) |
Adds a new node to the node list and returns its index. | |
void | DeleteNode (int n) |
Deletes node n. More... | |
void | DeleteNodes (std::vector< int > &delnodes) |
Deletes several nodes at once. More... | |
int | NumEdges () const |
Edge & | AddEdge (int i, int j) |
Edge & | AddEdge (int i, int j, const Edge &) |
bool | HasEdge (int i, int j) const |
Edge * | FindEdge (int i, int j) const |
void | DeleteEdge (int i, int j) |
void | DeleteOutgoingEdges (int i) |
void | DeleteIncomingEdges (int i) |
size_t | OutDegree (int n) const |
size_t | InDegree (int n) const |
void | Begin (int n, Iterator &) const |
void | NewTraversal () |
void | DFS (Callback &, Iterator) |
void | BFS (Callback &, Iterator) |
void | SimpleDFS (Callback &, Iterator) |
void | SimpleBFS (Callback &, Iterator) |
void | GuidedDFS (Callback &, Iterator) |
void | GuidedBFS (Callback &, Iterator) |
void | _DFS (int node, Callback &f, Iterator) |
void | _BFS (int node, Callback &f, Iterator) |
void | _SimpleDFS (int node, Callback &f, Iterator) |
void | _SimpleBFS (int node, Callback &f, Iterator) |
void | _GuidedDFS (int node, Callback &f, Iterator) |
void | _GuidedBFS (int node, Callback &f, Iterator) |
void | WriteDOT (std::ostream &out) |
Additional Inherited Members | |
Public Attributes inherited from Graph::Graph< Node, Edge > | |
std::vector< Color > | nodeColor |
std::vector< Node > | nodes |
std::vector< EdgeList > | edges |
std::vector< CoEdgeList > | co_edges |
std::list< Edge > | edgeData |
A specialization of a Graph to be directed graph.
This has some nice examples of how to use callbacks to perform graph computations.