is_integer_tangle#
- is_integer_tangle(tangle)#
Check if a tangle is an integer tangle.
An integer tangle can be “horizontal” or “vertical”. Conditions checked:
Diagram has exactly n - 4 crossings (where n is the number of nodes).
All but one of its faces are bigons (2-gons).
- Parameters:
tangle (PlanarDiagram | OrientedPlanarDiagram) – The tangle diagram to check.
- Returns:
True if the tangle is an integer tangle, False otherwise.
- Return type:
bool