graphscope.nx.generators.harary_graph.hkn_harary_graph¶
- graphscope.nx.generators.harary_graph.hkn_harary_graph(k, n, create_using=None)[source]¶
Returns the Harary graph with given node connectivity and node number.
The Harary graph
is the graph that minimizes the number of edges needed with given node connectivity and node number .This smallest number of edges is known to be ceil(
) [1].- Parameters:
k (integer) – The node connectivity of the generated graph
n (integer) – The number of nodes the generated graph is to contain
create_using (NetworkX graph constructor, optional Graph type) – to create (default=nx.Graph). If graph instance, then cleared before populated.
- Returns:
The Harary graph
.- Return type:
NetworkX graph
See also
Notes
This algorithm runs in
time. It is implemented by following the Reference [2].References