path_from_endpoint#
- path_from_endpoint(k: PlanarDiagram, endpoint: Endpoint) list #
Return the path (sequence of endpoints) starting from the given endpoint in a planar diagram.
The path continues until it reaches a vertex node or forms a closed component. It follows connections through twin endpoints, treating crossings appropriately. If the diagram is oriented, the path should follow the orientation (this is currently not implemented).
- Args:
k (PlanarDiagram): The planar diagram in which the path is traced. endpoint (Endpoint): The starting endpoint of the path.
- Returns:
list: A list of endpoints that form the continuous path until it reaches a vertex-like node or loops back.
- Raises:
TypeError: If the input endpoint is not an instance of Endpoint.