mirror#

mirror(k, crossings=None, inplace=False)#

Mirror a planar diagram.

For each crossing in crossings (or all crossings, if omitted), apply the permutation (1,2,3,0) which performs a quarter-rotation that mirrors the local crossing structure. Works for oriented and unoriented diagrams.

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

  • crossings (set | list | tuple | None) – Optional container of crossing node labels to mirror. If None, all crossings are mirrored.

  • inplace (bool) – If True, modify k in place, otherwise return a copy.

Returns:

The mirrored diagram (k if inplace=True; otherwise a new instance).