**** Partial class used to define other routines in digraphs Usage: _____g:_DIGRAPH{INT}_:=_#; _____g.add_node(1).add_node(2).add_node(3).connect(1,2).connect(1,3); _____Constructs: ______1 ______/\ _____2__3 ____Getting_the_nodes_in_depth_first_order: _______l:LIST{INT}_:=_#; _______loop_n:_INT_:=_DAG_ALG{INT,_DIGRAPH{INT}}::dfs!(g); ___________l_:=_l.append(n); ________end;

Flattened version is here

Ancestors
 \$RO_DIGRAPH{_} \$GRAPH{_,_} \$STR \$ELT{_} \$ELT

Descendants
 FILTERGRAPH_DIGRAPH_VIEW{_,_} FILTERGRAPH_DIGRAPH_VIEW{_} DIGRAPH_INCL{_} DIGRAPH_REV_DIGRAPH_VIEW{_,_} DIGRAPH_REV_DIGRAPH_VIEW{_} DIGRAPH{_} LBLD_DIGRAPH{_,_,_} WTD_DIGRAPH{_,_}

Public

Features
copy: \$DIGRAPH{NTP}
 **** True if both have the same set of nodes and edges
has(n: NTP): BOOL
stub has_edge(e: DIEDGE{NTP}): BOOL;
stub has_node(n: NTP): BOOL;
is_empty: BOOL
stub n_edges: INT;
stub n_incoming(n: NTP): INT;
stub n_nodes: INT;
stub n_outgoing(n: NTP): INT;
size: INT
 **** Print out the graph using the bound routine "f" for the nodes

Iters
 **** Adjacent is aliased to "outgoing"
stub edge!: DIEDGE{NTP};
 **** Returns the nodes of the graph
stub incoming!(once n: NTP): NTP;
stub node!: NTP;
stub outgoing!(once n: NTP): NTP;

Private

 **** There should not be void nodes in the graph!