easygraph.random package
Submodules
easygraph.random.hypergraph module
- easygraph.random.hypergraph.graph_Gnm(num_v: int, num_e: int)[source]
Return a random graph with
num_v
verteices andnum_e
edges. Edges are drawn uniformly from the set of possible edges.- Parameters
num_v (
int
) – The Number of vertices.num_e (
int
) – The Number of edges.
Examples
>>> import easygraph.random as random >>> g = random.graph_Gnm(4, 5) >>> g.e ([(1, 2), (0, 3), (2, 3), (0, 2), (1, 3)], [1.0, 1.0, 1.0, 1.0, 1.0])