module P: functor (G : Sig.P with type V.label = int) -> S with type graph = G.t
and type vertex = G.V.t
and type edge_label = G.E.label
Random persistent graphs
| Parameters: |
G |
: |
Sig.P with type V.label = int
|
|
type graph
type vertex
type edge_label
val graph : ?loops:bool -> v:int -> e:int -> unit -> graph
graph v e generates a random graph with exactly v vertices
and e edges. Vertices are labeled with 0 ... v-1.
The boolean loops indicates whether loops are allowed;
default value is no loop (false).
Nothing prevents the algorithm from looping if e is chosen too
large.
val labeled : (vertex -> vertex -> edge_label) ->
?loops:bool -> v:int -> e:int -> unit -> graph
labeled f is similar to graph except that edges are labeled
using function f