Port

Contents

Port#

class discopy.cmap.Port(kind, i, obj, depth, side)[source]#

Bases: builtins.object

A port in a combinatorial map.

Parameters:
  • kind (PortKind) – The kind of boundary or box port.

  • i (int) – The position within its boundary or box side.

  • obj (Ob) – The type carried by the port.

  • depth (float) – The box index, with inputs at -inf and outputs at +inf.

  • side (Literal['up', 'down']) – The vertical side on which the port is drawn.