bigger.triangulation.Triangulation¶

class
bigger.triangulation.
Triangulation
(edges: Callable[[], Iterable[Edge]], link: Callable[[bigger.triangulation.Side[~Edge][Edge]], Tuple[bigger.triangulation.Side[~Edge][Edge], bigger.triangulation.Side[~Edge][Edge], bigger.triangulation.Side[~Edge][Edge], bigger.triangulation.Side[~Edge][Edge]]])[source]¶ Bases:
typing.Generic
A triangulation of a (possibly infinite type) surface.
The triangulation is specified via two functions:
 edges: which returns an iterable over the edges of the triangulation, and
 link: which maps an oriented edge to its link, i.e., link(e) = (a, b, c, d)
#<—a—#  ^^  /  b e d  /  V/  #—c—>#

as_lamination
() → bigger.lamination.Lamination[~Edge][Edge][source]¶ Return this Triangulation as a Lamination on self.

corner
(side: bigger.triangulation.Side[~Edge][Edge]) → Tuple[bigger.triangulation.Side[~Edge][Edge], bigger.triangulation.Side[~Edge][Edge], bigger.triangulation.Side[~Edge][Edge]][source]¶ Return the triangle starting at this side.

disjoint_sum
(laminations: dict[bigger.Lamination[Edge], int]) → bigger.Lamination[Edge][source]¶ Return the lamination made from summing the given laminations.

draw
(edges: list[Edge], **options) → Image[source]¶ Return a PIL image of this Triangulation around the given edges.

edge_arc
(edge: Edge) → bigger.lamination.Lamination[~Edge][Edge][source]¶ Return the given edge as a Lamination.

empty_lamination
() → bigger.lamination.Lamination[~Edge][Edge][source]¶ Return the zero Lamination on this triangulation.

encode
(sequence: list[Union[Callable[[Side[Edge]], bool], Container[Side[Edge]], tuple[Callable[[Side[Edge]], Side[Edge]], Callable[[Side[Edge]], Side[Edge]]], tuple[int, Callable[[Edge], Edge], Callable[[Edge], Edge]], dict[Side[Edge], Side[Edge]], Side[Edge]]]) → bigger.Encoding[Edge][source]¶ Return an
Encoding
from a small sequence of data.There are several conventions that allow these to be specified by a smaller amount of information:
 A container or callable is used to flip those edges.
 A dict or pair of callables is used to encode an isomety.
 Otherwise, it is assumed to be the label of an edge to flip.
The sequence is read in reverse in order to respect composition.

flip
(is_flipped: Callable[[Side[Edge]], bool]  Container[Side[Edge]]) → bigger.Encoding[Edge][source]¶ Return an
Encoding
consisting of a singleMove
which flips all edges whereis_flipped
is True.Alternatively, this can be given a container of Sides and will use membership of this container to test which edges flip. Note that if
is_flipped
is True for edge then it must be False for all edges in its link and ~edge.

classmethod
from_pos
(edges: Callable[[], Iterable[Edge]], ulink: Callable[[Edge], tuple[Edge, bool, Edge, bool, Edge, bool, Edge, bool]]) → Triangulation[Edge][source]¶ Return a triangulation from a link function defined on only the positive edges.

identity
() → bigger.encoding.Encoding[~Edge][Edge][source]¶ Return an
Encoding
which represents the identity mapping class.

is_flippable
(side: bigger.triangulation.Side[~Edge][Edge]) → bool[source]¶ Return whether the given side is flippable.

isometry
(target: bigger.triangulation.Triangulation[~Edge][Edge], isom: Callable[[Edge], Edge], inv_isom: Callable[[Edge], Edge]) → bigger.encoding.Encoding[~Edge][Edge][source]¶ Return an
Encoding
which maps edges under the specified relabelling.

left
(side: bigger.triangulation.Side[~Edge][Edge]) → bigger.triangulation.Side[~Edge][Edge][source]¶ Return the side to the left of the given one in its triangle.

relabel
(isom: Callable[[bigger.triangulation.Side[~Edge][Edge]], bigger.triangulation.Side[~Edge][Edge]], inv_isom: Callable[[bigger.triangulation.Side[~Edge][Edge]], bigger.triangulation.Side[~Edge][Edge]]) → bigger.encoding.Encoding[~Edge][Edge][source]¶ Return an
Encoding
which maps edges under the specified relabelling.

relabel_from_dict
(isom_dict: Mapping[bigger.triangulation.Side[~Edge][Edge], bigger.triangulation.Side[~Edge][Edge]]) → bigger.encoding.Encoding[~Edge][Edge][source]¶ Return an
Encoding
which relabels Edges inisom_dict
an leaves all other edges unchanged.

right
(side: bigger.triangulation.Side[~Edge][Edge]) → bigger.triangulation.Side[~Edge][Edge][source]¶ Return the side to the right of the given one in its triangle.

side_arc
(side: bigger.triangulation.Side[~Edge][Edge]) → bigger.lamination.Lamination[~Edge][Edge][source]¶ Return the given side as a Lamination.

side_curve
(side: bigger.triangulation.Side[~Edge][Edge]) → bigger.lamination.Lamination[~Edge][Edge][source]¶ Return the curve partial N(side).

star
(side: bigger.triangulation.Side[~Edge][Edge]) → Tuple[bigger.triangulation.Side[~Edge][Edge], bigger.triangulation.Side[~Edge][Edge], bigger.triangulation.Side[~Edge][Edge], bigger.triangulation.Side[~Edge][Edge], bigger.triangulation.Side[~Edge][Edge]][source]¶ Return the link of an Side together with the Side itself.

tetra
(side: bigger.triangulation.Side[~Edge][Edge]) → Tuple[bigger.triangulation.Side[~Edge][Edge], bigger.triangulation.Side[~Edge][Edge], bigger.triangulation.Side[~Edge][Edge], bigger.triangulation.Side[~Edge][Edge], bigger.triangulation.Side[~Edge][Edge], bigger.triangulation.Side[~Edge][Edge]][source]¶ Return the link of an Side together with the Side itself and its inverse.