helper.random_geo_graph_generator

helper.random_geo_graph_generator(k, seed=None)[source]

Generate a random geometric graph with 2 **k* + 2 nodes.

Graph is generated in the unit square with random node positions. The graph is undirected, made complete (metric closure), and edges are weighted by their Euclidian distance.

Parameters:
  • k (int) – 2 **k* + 2 is the number of nodes in graph.
  • seed (int) – Seed for random graph generator. System time taken as default.
Returns:

G – Randomly generated graph on unit square of 2*k+2 nodes.

Return type:

graph