edgegraph.builder.randgraph.randgraph#
- edgegraph.builder.randgraph.randgraph(count=15, edge=<class 'edgegraph.structure.directededge.DirectedEdge'>, connectivity=None, ensurelink=True)#
Create a random graph.
This function creates a graph with the specified number of verticies, and returns it as a
Universe. Their links are decided randomly.- Parameters:
count (int) – How many verticies to create. Default 15.
edge (type) – Type of edge to use. Default
DirectedEdge.connectivity (float | None) – Rough control over how many edges are created for each vertex. If specified, must be a float
0 < connectivity <= 1. If not specified, calculated automatically to author’s preference.ensurelink (bool | None) – Ensure that every vertex gets at least one edge.
- Returns:
a
Universeobject containing the graph.- Return type: