is_loop#
- is_loop(k, arc_or_endpoint)#
Return True if an arc/endpoint forms a loop (an arc whose ends are on the same node which is a Vertex).
- Parameters:
k (PlanarDiagram) – Diagram.
arc_or_endpoint – Either a single Endpoint or a 2-endpoint container (arc).
- Return type:
bool
Notes
“Kink” is a special loop notion at crossings; see is_kink.