package ocamlgraph
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
A generic graph library for OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
ocamlgraph-2.2.0.tbz
sha256=b0956210863cc24f480203ba3c2ef06dfae5579536a05744364e7de58822b230
sha512=257cdd5fb90337b3e3682cade1269c1d181f3124e569a731909f49bbfbe581ab529ac401472fb9ef57166ac34d8ebadfa6a32c93665f38f5a335982d5e5dc0e1
doc/ocamlgraph/Graph/Rand/Make/index.html
Module Rand.MakeSource
Random graphs
Parameters
module B : Builder.INTSignature
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).
Source
val labeled :
(vertex -> vertex -> edge_label) ->
?loops:bool ->
v:int ->
e:int ->
unit ->
graphlabeled f is similar to graph except that edges are labeled using function f.
The two functions above actually make a choice between two different implementations according to the ratio e/(v*v). When this ratio is small, random_few_edges is selected; otherwise random_many_edges is selected.
random graph using the G(n,p) model. gnp v prob generates a random graph with exactly v vertices and where each edge is selected with probability prob
Source
val gnp_labeled :
(vertex -> vertex -> edge_label) ->
?loops:bool ->
v:int ->
prob:float ->
unit ->
graphgnp_labeled add_edge v e is similar to gnp except that edges are labeled using function f.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page