pygraph.algorithms.generators

Package pygraph :: Package algorithms :: Module generators |

# Module generators

Random graph generators.

Functions
generate(num_nodes, num_edges, directed=False, weight_range=`(`1`,` 1`)`) Create a random graph. |
generate_hypergraph(num_nodes, num_edges, r=0) Create a random hyper graph. |

Variables
| __package__ = ``'``pygraph.algorithms``'``

Function Details

### generate(num_nodes, num_edges, directed=False, weight_range=`(`1`,` 1`)`) |
Create a random graph. Parameters: `num_nodes` (number) - Number of nodes. `num_edges` (number) - Number of edges. `directed` (bool) - Whether the generated graph should be directed or not. `weight_range` (tuple) - tuple of two integers as lower and upper limits on randomly generated weights (uniform distribution).

### generate_hypergraph(num_nodes, num_edges, r=0) |
Create a random hyper graph. Parameters: `num_nodes` (number) - Number of nodes. `num_edges` (number) - Number of edges. `r` (number) - Uniform edges of size r.