Module Graph__Classic.I
Classic Imperative Graphs
Parameters
G : Graph.Sig.I with type V.label = int
Signature
type graph= G.t
val divisors : int -> graphdivisors nbuilds the graph of divisors. Vertices are integers from2ton.iis connected tojif and only ifidividesj.- raises Invalid_argument
is
n < 2.
val de_bruijn : int -> graphde_bruijn nbuilds the de Bruijn graph of ordern. Vertices are bit sequences of lengthn(encoded as their interpretation as binary integers). The sequencexwis connected to the sequencewyfor any bitsxandyand any bit sequencewof lengthn-1.- raises Invalid_argument
is
n < 1orn > Sys.word_size-1.
val vertex_only : int -> graphvertex_only nbuilds a graph withnvertices and no edge.
val full : ?self:bool -> int -> graphfull nbuilds a graph withnvertices and all possible edges. The optional argumentselfindicates if loop edges should be added (default value istrue).