| GraphGenerator Class |
Namespace: Algs4Net
public class GraphGenerator
The GraphGenerator type exposes the following members.
| Name | Description | |
|---|---|---|
| BinaryTree |
Returns a complete binary tree graph on V vertices. | |
| Bipartite(Int32, Int32, Double) |
Returns a random simple bipartite graph on V1 and V2 vertices,
containing each possible edge with probability p. | |
| Bipartite(Int32, Int32, Int32) |
Returns a random simple bipartite graph on V1 and V2 vertices
with E edges. | |
| Complete |
Returns the complete graph on V vertices. | |
| CompleteBipartite |
Returns a complete bipartite graph on V1 and V2 vertices. | |
| Cycle |
Returns a cycle graph on V vertices. | |
| EulerianCycle |
Returns an Eulerian cycle graph on V vertices. | |
| EulerianPath |
Returns an Eulerian path graph on V vertices. | |
| MainTest |
Demo test the GraphGenerator library. | |
| Path |
Returns a path graph on V vertices. | |
| Regular |
Returns a uniformly random k-regular graph on V vertices
(not necessarily simple). The graph is simple with probability only about e^(-k^2/4),
which is tiny when k = 14. | |
| Simple(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. | |
| Simple(Int32, Int32) | Returns a random simple graph containing V vertices and E edges.
| |
| Star |
Returns a star graph on V vertices. | |
| Tree |
Returns a uniformly random tree on V vertices.
This algorithm uses a Prufer sequence and takes time proportional to V log V. | |
| Wheel |
Returns a wheel graph on V vertices. |
For additional documentation, see Section 4.1 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
This class is a C# port from the original Java class GraphGenerator implementation by the respective authors.