permute_node#

permute_node(k, node, permutation)#

Permute the endpoint indices of a node.

Example

permutation = {0: 0, 1: 2, 2: 3, 3: 1} maps [a, b, c, d] -> [a, d, b, c].

Parameters:
  • k (PlanarDiagram | OrientedPlanarDiagram) – Diagram to modify.

  • node – Node label.

  • permutation (dict | list | tuple) – Mapping or sequence giving new index for each old index.

Return type:

None