Classic.IClassic Imperative Graphs
type graph = G.ttype vertex = G.V.tval divisors : int -> graphdivisors n builds the graph of divisors. Vertices are integers from 2 to n. i is connected to j if and only if i divides j.
val de_bruijn : int -> graphde_bruijn n builds the de Bruijn graph of order n. Vertices are bit sequences of length n (encoded as their interpretation as binary integers). The sequence xw is connected to the sequence wy for any bits x and y and any bit sequence w of length n-1.
val vertex_only : int -> graphvertex_only n builds a graph with n vertices and no edge.
val full : ?self:bool -> int -> graphfull n builds a graph with n vertices and all possible edges. The optional argument self indicates if loop edges should be added (default value is true).
cycle n builds a graph that is a cycle with n vertices. Vertices are labelled with 0,1,...,n-1 and there is an edge from vertex i to vertex (i+1) mod n. Vertices are also returned in an array for convenience.