# enumerate-simple-cycles.api
# This module enumerates all simple cycles in a graph.
# Each cycle is reprensented as a list of edges. Adjacent edges
# are adjacent in the list. The function works like fold: all cycles
# are ``folded'' together with a user supplied function.
#
# -- Allen Leung
# Compiled by:
#
src/lib/graph/graphs.lib### "Reason has no power to change opinions it did not create."
stipulate
package odg = oop_digraph; # oop_digraph is from
src/lib/graph/oop-digraph.pkgherein
api Enumerate_Simple_Cycles {
#
# Enumerate all simple cycles:
cycles: odg::Digraph(N,E,G) # Here N,E,G stand stead for the types of client-package-supplied records associated with (respectively) nodes, edges and graphs.
->
((List( odg::Edge(E) ), X) -> X)
->
X
->
X;
};
end;