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, modify k in place, otherwise return a copy.

Returns:

The orientation-reversed diagram.

Raises:

TypeError – If k is an unoriented PlanarDiagram.

Return type:

OrientedPlanarDiagram