1 #ifndef GRAPH_DIRECTED_GRAPH_H 2 #define GRAPH_DIRECTED_GRAPH_H 15 template <
class Node,
class Edge>
29 bool HasDescendent(
int n,
int d);
30 bool HasAncestor(
int n,
int a);
31 std::list<int> TopologicalSort();
35 template <
class Node,
class Edge>
41 return P::_SimpleDFS(n,findNode,it);
44 template <
class Node,
class Edge>
47 return HasDescendent(a,n);
50 template <
class Node,
class Edge>
58 template <
class Node,
class Edge>
A template base class for a graph traversal.
Definition: Callback.h:21
Compute if the graph has a cycle.
Definition: Callback.h:105
A specialization of a Graph to be directed graph.
Definition: DirectedGraph.h:16
Namespace for all classes and functions in the Graph subdirectory.
Definition: ApproximateShortestPaths.h:7
Perform topological sort, when used with DFS.
Definition: Callback.h:115
Find a particular node.
Definition: Callback.h:53