DigraphGeneratorStrong Method |
Returns a random simple digraph on V vertices, E
edges and (at least) c strong components. The vertices are randomly
assigned integer labels between 0 and c-1 (corresponding to
strong components). Then, a strong component is creates among the vertices
with the same label. Next, random edges (either between two vertices with
the same labels or from a vetex with a smaller label to a vertex with a
larger label). The number of components will be equal to the number of
distinct labels that are assigned to vertices.
Namespace: Algs4NetAssembly: Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static Digraph Strong(
int V,
int E,
int c
)
Parameters
- V
- Type: SystemInt32
the number of vertices - E
- Type: SystemInt32
the number of edges - c
- Type: SystemInt32
the (maximum) number of strong components
Return Value
Type:
Digrapha random simple digraph on
V vertices and
E edges, with (at most)
c strong components
Exceptions
See Also