Module type Rand.S
val graph : ?loops:bool -> v:int -> e:int -> unit -> graphgraph v egenerates a random graph with exactlyvvertices andeedges. Vertices are labeled with0...v-1. The booleanloopsindicates whether loops are allowed; default value is no loop (false).- raises Invalid_argument
if
eexceeds the maximal number of edges.
val labeled : (vertex -> vertex -> edge_label) -> ?loops:bool -> v:int -> e:int -> unit -> graphlabeled fis similar tographexcept that edges are labeled using functionf.- raises Invalid_argument
if there are too many edges.
val random_few_edges : loops:bool -> v:int -> e:int -> graphval random_many_edges : loops:bool -> v:int -> e:int -> graphval gnp : ?loops:bool -> v:int -> prob:float -> unit -> graphrandom graph using the G(n,p) model.
gnp v probgenerates a random graph with exactlyvvertices and where each edge is selected with probabilityprob
val gnp_labeled : (vertex -> vertex -> edge_label) -> ?loops:bool -> v:int -> prob:float -> unit -> graphgnp_labeled add_edge v eis similar tognpexcept that edges are labeled using functionf.