KrisLibrary  1.0.0
Public Types | Public Member Functions | List of all members
Graph::DirectedGraph< Node, Edge > Class Template Reference

A specialization of a Graph to be directed graph. More...

#include <DirectedGraph.h>

Inheritance diagram for Graph::DirectedGraph< Node, Edge >:
Graph::Graph< Node, Edge >

Public Types

typedef Graph< Node, EdgeP
 
typedef EdgeIterator< EdgeForwardIterator
 
typedef EdgeIterator< EdgeReverseIterator
 
- 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
 
EdgeAddEdge (int i, int j)
 
EdgeAddEdge (int i, int j, const Edge &)
 
bool HasEdge (int i, int j) const
 
EdgeFindEdge (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< Nodenodes
 
std::vector< EdgeList > edges
 
std::vector< CoEdgeList > co_edges
 
std::list< EdgeedgeData
 

Detailed Description

template<class Node, class Edge>
class Graph::DirectedGraph< Node, Edge >

A specialization of a Graph to be directed graph.

This has some nice examples of how to use callbacks to perform graph computations.


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