Module Digraph.Classic
Classic graphs
val divisors : int -> tdivisors 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 -> tde_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 -> tvertex_only nbuilds a graph withnvertices and no edge.
val full : ?self:bool -> int -> tfull nbuilds a graph withnvertices and all possible edges. The optional argumentselfindicates if loop edges should be added (default value istrue).