Package graph :: Module generators

Module generators

Random graph generators for python-graph.


Author: Pedro Matiello

License: MIT

Functions
 
generate(graph, num_nodes, num_edges, directed=False)
Add nodes and random edges to the graph.
Function Details

generate(graph, num_nodes, num_edges, directed=False)

 

Add nodes and random edges to the graph.

Parameters:
  • graph (graph) - Graph.
  • num_nodes (number) - Number of nodes.
  • num_edges (number) - Number of edges.
  • directed (boolean) - Wether the generated graph should be directed or not.