DigraphGeneratorSimple Method (Int32, Double) |
Returns a random simple digraph on V vertices, with an
edge between any two vertices with probability p. This is sometimes
referred to as the Erdos-Renyi random digraph model.
This implementations takes time propotional to V^2 (even if p is small).
Namespace: Algs4NetAssembly: Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static Digraph 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:
Digrapha random simple digraph on
V vertices, with an edge between
any two vertices with probability
p
Exceptions
See Also