Data types¶
Module for defining data type used for type hinting.
- pyrigi.data_type.DirectedEdge: TypeAlias = tuple[typing.Hashable, typing.Hashable] | list[typing.Hashable]¶
An ordered pair of
Vertices
.
- pyrigi.data_type.Edge: TypeAlias = set[typing.Hashable] | tuple[typing.Hashable, typing.Hashable] | list[typing.Hashable]¶
An unordered pair of
Vertices
.
- pyrigi.data_type.Inf¶
Provides a data type that can become infinite.
- pyrigi.data_type.InfFlex: TypeAlias = collections.abc.Sequence[int | float | str] | dict[typing.Hashable, collections.abc.Sequence[int | float | str]]¶
Given a framework in dimension
dim
withn
vertices, an infinitesimal flex is either given by aSequence
ofNumbers
whose length isdim*n
or by a dictionary from the set of vertices to aSequence
ofNumbers
of lengthdim
.
- pyrigi.data_type.Number: TypeAlias = int | float | str¶
An integer, float or a string interpretable by
sympify()
.
- pyrigi.data_type.Stress: TypeAlias = collections.abc.Sequence[int | float | str] | dict[set[typing.Hashable] | tuple[typing.Hashable, typing.Hashable] | list[typing.Hashable], int | float | str]¶
Given a framework with
m
edges, an equilibrium stress is either given by aSequence
ofNumbers
whose length ism
or by a dictionary from the set of edges to aSequence
ofNumbers
.
- pyrigi.data_type.Vertex¶
Any hashable type can be used for a
pyrigi.data_type.Vertex
.alias of
Hashable