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 with n vertices, an infinitesimal flex is either given by a Sequence of Numbers whose length is dim*n or by a dictionary from the set of vertices to a Sequence of Numbers of length dim.

pyrigi.data_type.Number: TypeAlias = int | float | str

An integer, float or a string interpretable by sympify().

pyrigi.data_type.Point

A Sequence of Numbers whose length is the dimension of its affine space.

alias of Sequence[int | float | str]

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 a Sequence of Numbers whose length is m or by a dictionary from the set of edges to a Sequence of Numbers.

pyrigi.data_type.Vertex

Any hashable type can be used for a pyrigi.data_type.Vertex.

alias of Hashable