degree_sequence#
- degree_sequence(k: PlanarDiagram) tuple #
Compute and return the degree sequence of all nodes in a given PlanarDiagram.
- Args:
- k (PlanarDiagram): The input planar diagram, where each node has a certain degree
representing the number of endpoints connected to it.
- Returns:
- tuple: A tuple containing the sorted degree sequence (in ascending order) of nodes in the
planar diagram.