Port#
- class discopy.cmap.Port(kind, i, obj, depth, side)[source]#
Bases:
builtins.objectA 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
-infand outputs at+inf.side (Literal['up'] | ~typing.Literal['down']) – The vertical side on which the port is drawn.
- property direction: Literal['up'] | Literal['down']#
The adjoint-aware direction of the wire at the port.