graphscope.nx.generators.degree_seq.directed_havel_hakimi_graph¶
- graphscope.nx.generators.degree_seq.directed_havel_hakimi_graph(in_deg_sequence, out_deg_sequence, create_using=None)[source]¶
Returns a directed graph with the given degree sequences.
- Parameters:
in_deg_sequence (list of integers) – Each list entry corresponds to the in-degree of a node.
out_deg_sequence (list of integers) – Each list entry corresponds to the out-degree of a node.
create_using (NetworkX graph constructor, optional (default DiGraph)) – Graph type to create. If graph instance, then cleared before populated.
- Returns:
G – A graph with the specified degree sequences. Nodes are labeled starting at 0 with an index corresponding to the position in deg_sequence
- Return type:
- Raises:
NetworkXError – If the degree sequences are not digraphical.
See also
Notes
Algorithm as described by Kleitman and Wang [1].
References