randomize_diagram#
- randomize_diagram(k, crossing_increasing_moves=2)#
Perform random Reidemeister moves on a given diagram.
This function modifies a diagram by applying random Reidemeister moves, which are transformations used in knot theory to simplify or alter the representation of a knot or link. The user can specify the type of moves to include and the number of crossing-increasing moves to perform.
- Parameters:
k: The initial diagram to be transformed. crossing_increasing_moves (int): Optional; the number of crossing-increasing
moves to perform. Default is 2.
- Raises:
- ValueError: If crossing_increasing_moves is set to a value greater than 0 but
“R2” or “R1” moves are not included in settings.allowed_moves.
- Returns:
The transformed diagram after applying the specified random Reidemeister moves.