knit_graphs.artin_wale_braids.Wale_Braid module
Model of knitted structure as a set of crossing wales using artin braid groups.
This module provides the Wale_Braid class which represents complex cable knitting patterns as mathematical braid structures, using concepts from algebraic topology to model how wales cross over and under each other.
- class Wale_Braid(wale_groups, wale_words)[source]
Bases:
object
A model of knitted structure as a set of crossing wales using Artin braid groups.
This class represents complex cable knitting patterns using mathematical braid theory, where wales are treated as strands in a braid and their crossings are represented as braid operations. This provides a formal mathematical framework for analyzing and manipulating cable patterns.
- wale_groups
The collection of wale groups that participate in the braid structure.
- Type:
- wale_words
The sequence of braid words that describe the crossing operations between wales.
- Type:
- Parameters:
wale_groups (
list
[Wale_Group
])wale_words (
list
[Wale_Braid_Word
])
- __init__(wale_groups, wale_words)[source]
Initialize a wale braid with the specified groups and braid words.
- Parameters:
wale_groups (list[Wale_Group]) – The wale groups that participate in this braid structure.
wale_words (list[Wale_Braid_Word]) – The sequence of braid words describing the crossing operations.
- reduce()[source]
Simplify the braid by removing pairs of braid words that invert each other.
- Return type:
- This method modifies the wale_words list by identifying and removing adjacent pairs of braid words that are inverses of each other,
effectively canceling out their operations to create a simplified but equivalent braid representation.