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: list[Wale_Group], wale_words: list[Wale_Braid_Word[LoopT]])[source]

Bases: Generic[LoopT]

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:

list[Wale_Group]

wale_words

The sequence of braid words that describe the crossing operations between wales.

Type:

list[Wale_Braid_Word]

__init__(wale_groups: list[Wale_Group], wale_words: list[Wale_Braid_Word[LoopT]]) None[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() None[source]

Simplify the braid by removing pairs of braid words that invert each other.

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.

classmethod __class_getitem__(params)

Parameterizes a generic class.

At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.

However, note that this method is also called when defining generic classes in the first place with class Foo(Generic[T]): ….