networkx.generators.margulis_gabber_galil_graph¶
-
networkx.generators.margulis_gabber_galil_graph(n, create_using=None)[source]¶ Return the Margulis-Gabber-Galil undirected MultiGraph on n^2 nodes.
The undirected MultiGraph is regular with degree 8. Nodes are integer pairs. The second-largest eigenvalue of the adjacency matrix of the graph is at most 5 sqrt{2}, regardless of n.
Parameters: n : int
Determines the number of nodes in the graph: n^2.
create_using : graph-like
A graph-like object that receives the constructed edges. If None, then a
MultiGraphinstance is used.Returns: G : graph
The constructed undirected multigraph.
Raises: NetworkXError
If the graph is directed or not a multigraph.