curver.kernel.mappingclassgroup.MappingClassGroup

class curver.kernel.mappingclassgroup.MappingClassGroup(pos_mapping_classes=None, curves=None, arcs=None)[source]

Bases: object

This represents a triangulation along with a collection of named mapping classes on it.

It can also be given a list of curves and arcs, in which case the twists and half-twists about these are also added to the list of known mapping classes. Most importantly this object can construct a mapping class from a string descriptor. See self.mapping_class for additional information.

cayley(generators, length)[source]

Explore the Cayley graph for self with respect to the given generators. Yield the canonical names for all elements with at most the given length as they are encountered.

lamination(geometric)[source]

Return a new lamination on this surface assigning the specified weight to each edge.

mapping_class(data, **kwargs)[source]

Return a mapping class from data.

Data can either be:
  • an iterable of mapping_class names,
  • an integer specifying the word length of a random mapping class, or
  • a string specifying the generators to be composed together.

The string supports ‘^’ powers, parentheses and optional ‘.’ separators. Raises a ValueError if given a string that cannot be decomposed.

random_word(length, positive=True, negative=True, letters=None)[source]

Return a random sequence of generators of the required length.

The letters to choose from can be specified or, alternatively, the set of positive, negative or all (default) mapping classes can be used by using the flags postive and negative.