Swap

Contents

Swap#

class discopy.symmetric.Swap(dom=None, perm=None)[source]#

Bases: Permutation, discopy.balanced.Braid, Box

The permutation [1, 0] of two atomic types.

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.