GraphGeneratorSimple Method (Int32, Double) |
Returns a random simple graph on V vertices, with an
edge between any two vertices with probability p. This is sometimes
referred to as the Erdos-Renyi random graph model.
Namespace: Algs4NetAssembly: Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static Graph Simple(
int V,
double p
)
Parameters
- V
- Type: SystemInt32
the number of vertices - p
- Type: SystemDouble
the probability of choosing an edge
Return Value
Type:
Grapha random simple graph on
V vertices, with an edge between
any two vertices with probability
p
Exceptions
See Also