Loading...
Searching...
No Matches
A Template Class for Graphs.
More...
#include <algorithm>
#include <functional>
#include <iosfwd>
#include <list>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <vector>
#include "invariant.h"
+ Include dependency graph for graph.h:
+ This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
This class represents a node in a directed graph.
More...
A node type with an extra bit.
More...
A generic directed graph with a parametric node type.
More...
Compute intersection of two edge sets, in linear time.
Add to set, nodes that are reachable from set.
Detailed Description
A Template Class for Graphs.
Definition in file graph.h.
Function Documentation
◆ get_reachable()
Add to set, nodes that are reachable from set.
This implements a depth first search using a stack: at each step we pop a node, and push on the stack all its successors that have not yet been visited.
- Parameters
-
set set of source nodes, must be a container with an insert(const value_type&) method.
for_each_successor function which given a node n and a function f, applies f on all successors of n.
Definition at line 573 of file graph.h.
◆ intersection()
Compute intersection of two edge sets, in linear time.
Definition at line 115 of file graph.h.
◆ output_dot_generic()
void output_dot_generic
(
std::ostream &
out,
)