ogposets.El

class rewalt.ogposets.El(dim, pos)

Bases: tuple

Class for elements of an oriented graded poset.

An element is encoded as a pair of non-negative integers: the dimension of the element, and its position in a linear order of elements of the given dimension.

Parameters
  • dim (int) – The dimension of the element.

  • pos (int) – The position of the element.

Examples

>>> x = El(2, 3)
>>> x.dim
2
>>> x.pos
3

Methods

shifted(k)

Returns the element of the same dimension, with position shifted by a given integer.

Attributes

dim

Returns the dimension of the element.

pos

Returns the position of the element.

property dim

Returns the dimension of the element.

Returns

dim – The dimension of the element.

Return type

int

property pos

Returns the position of the element.

Returns

pos – The position of the element

Return type

int

shifted(k)

Returns the element of the same dimension, with position shifted by a given integer.

Parameters

k (int) – The shift in position.

Returns

shifted – The shifted element.

Return type

El