Click or drag to resize
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: Algs4Net
Assembly: Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public 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: Graph
a random simple graph on V vertices, with an edge between any two vertices with probability p
Exceptions
ExceptionCondition
ArgumentExceptionif probability is not between 0 and 1
See Also