This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.
directed_havel_hakimi_graph(in_deg_sequence, out_deg_sequence, create_using=None)¶
Return a directed graph with the given degree sequences.
- 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 (graph, optional (default DiGraph)) – Return graph of this type. The instance will be cleared.
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.
Algorithm as described by Kleitman and Wang .
 D.J. Kleitman and D.L. Wang Algorithms for Constructing Graphs and Digraphs with Given Valences and Factors Discrete Mathematics, 6(1), pp. 79-88 (1973)