module Graph:Graph operations. This module is similar to the graph library module common in Prolog systems.sig..end
The P-representation of a graph is a list of (from, to) vertex pairs, where the pairs can be in any old order.
The S-representation of a graph is a list of (vertex, neighbours)
pairs, where the pairs are ordered according to their vertex and
the neighbours of each vertex are also orderered.
Structural equality (i.e. =) and Pervasives.compare are used
for identity and comparison of vertices.
type'ap_graph =('a * 'a) list
type'as_graph =('a * 'a list) list
val p_to_s_graph : 'a p_graph -> 'a s_graphval s_to_p_graph : 'a s_graph -> 'a p_graphval p_transpose : 'a p_graph -> 'a p_graphval warshall : 'a s_graph -> 'a s_graphval top_sort : 'a s_graph -> 'a listNot_found if the graph is cyclic.