loops#

loops(k: PlanarDiagram) list#

Returns a set of arcs that form loops in the planar diagram.

A loop is an arc that connects a node to itself, provided the node is not a vertex. An arc is a tuple of two endpoints.

Args:

k (PlanarDiagram): The planar diagram.

Returns:

set: A set of arcs that are loops.