Graphicallity#
Undirected degree sequence#
 is_graphic(degree_seq: List[int]) bool #

template<std::ranges::forward_range Range>
requires degree_range<Range>
bool is_graphic(Range &°ree_sequence)#
Checks if the sequence can be the degree sequence of a valid undirected graph, containing no multiedges or loops, based on the Erdős–Gallai algorithm [8, 9].
Directed degreepair sequence#
 is_digraphic(in_out_degree_sequence: List[Pair[int, int]]) bool #
Checks if the sequence can be the degreepair sequence of a valid directed graph, containing no multiedges or loops, based on the algorithm by Kleitman and Wang [10].
A degree pair sequence is a range (list) of pairs (2tuples) of integers, where the first element of each item represents indegree and the second item outdegree of one vertex.