edges#
- edges(k: PlanarDiagram, **endpoint_attributes) list #
Return a list of (ordered) edges/strands of the diagram. An edge is an (ordered) list of endpoints of alternating endpoints, the first two pairs are twins, the third element is an adjacent endpoint over the crossing. The edge start from vertex-like nodes if they exist, otherwise from a crossing-like node. A crossing-like node is detected by a non-None return value of jump_over(0). The edge follow orientation if the diagram is oriented. :param k: PlanarDiagram instance :param endpoint_attributes: a filter of attributes of the endpoint. Only edges are returned that have the given attributes. :return: list of (ordered) strands
Example: - edges(k) returns all edges of the spatial graph - edges(k, color=1) returns all edges that have color 1