Returns True if sequence is a valid degree sequence.
A degree sequence is valid if some graph can realize it.
Parameters : | sequence : list or iterable container
method : “eg” | “hh”
|
---|---|
Returns : | valid : bool
|
References
Examples
>>> G = nx.path_graph(4)
>>> sequence = G.degree().values()
>>> nx.is_valid_degree_sequence(sequence)
True