reverse#
- reverse(k, inplace=False)#
Reverse orientation of an oriented diagram.
Swaps each arc’s endpoint types (ingoing/outgoing) accordingly.
- Parameters:
k (OrientedPlanarDiagram) – Oriented planar diagram to reverse.
inplace (bool) – If
True, modifykin place, otherwise return a copy.
- Returns:
The orientation-reversed diagram.
- Raises:
TypeError – If
kis an unorientedPlanarDiagram.- Return type: