remove_unknots#
- remove_unknots(k: PlanarDiagram, max_unknots=None)#
Remove unknots from the diagram (up to max_unknots unknots if given).
- Parameters:
k (PlanarDiagram) – The input planar diagram.
max_unknots (int, optional) – Maximum number of unknots to remove (removes all if None).
- Returns:
The number of unknots removed.
- Return type:
int