hnm_harary_graph#
- hnm_harary_graph(n, m, create_using=None)[source]#
Returns the Harary graph with given numbers of nodes and edges.
The Harary graph
is the graph that maximizes node connectivity with nodes and edges.This maximum node connectivity is known to be floor(
). [1]- Parameters:
- n: integer
The number of nodes the generated graph is to contain
- m: integer
The number of edges the generated graph is to contain
- create_usingNetworkX graph constructor, optional Graph type
to create (default=nx.Graph). If graph instance, then cleared before populated.
- Returns:
- NetworkX graph
The Harary graph
.
See also
Notes
This algorithm runs in
time. It is implemented by following the Reference [2].References