Swap

Contents

Swap#

class discopy.symmetric.Swap(left, right)[source]#

Bases: Braid, Box

The swap of atomic types left and right.

Parameters:
  • left – The type on the top left and bottom right.

  • right – The type on the top right and bottom left.

Important

Swap is only defined for atomic types (i.e. of length 1). For complex types, use Diagram.swap() instead.