pull_and_plug_endpoint#
- pull_and_plug_endpoint(k, source_endpoint, destination_endpoint)#
Pull out one endpoint and plug it somewhere else.
This splits the source arc, creates a leaf at the destination, connects them, and removes temporary bivalent vertices. Operates in place.
- Parameters:
k (PlanarDiagram | OrientedPlanarDiagram) – Diagram to modify.
source_endpoint (Endpoint | tuple) – Endpoint or (node, position) to pull out.
destination_endpoint (Endpoint | tuple) – Endpoint or (node, position) where it is plugged.
- Return type:
None