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
, modifyk
in place, otherwise return a copy.
- Returns:
The orientation-reversed diagram.
- Raises:
TypeError – If
k
is an unorientedPlanarDiagram
.- Return type: