Module Planar.I
Random imperative planar graphs
Parameters
G : Graph.Sig.I with type V.label = int * int and type E.label = int
Signature
type graph= G.t
val graph : ?loops:bool -> xrange:(int * int) -> yrange:(int * int) -> prob:float -> int -> graphgraph xrange yrange prob vgenerates a random planar graph with exactlyvvertices. Vertices are labeled with integer coordinates, randomly distributed according toxrangeandyrange. Edges are built as follows: the full Delaunay triangulation is constructed and then each edge is discarded with probabiblityprob(which should lie in0..1). In particularprob = 0.0gives the full triangulation. Edges are labeled with the (rounded) Euclidean distance between the two vertices. The booleanloopsindicates whether loops are allowed; default value is no loop (false).