toponetx.HyperEdgeView#

class toponetx.HyperEdgeView[source]#

Bases: AtomView

A class for viewing the cells/hyperedges of a combinatorial complex.

Provides methods for accessing, and retrieving information about the cells/hyperedges of a complex.

Attributes:
allranks

All ranks.

shape

Compute shape.

Methods

get_rank(edge)

Get the rank of a hyperedge.

skeleton(rank[, level])

Skeleton of the complex.

Examples

>>> hev = tnx.HyperEdgeView()
__init__() None[source]#

Methods

__init__()

get_rank(edge)

Get the rank of a hyperedge.

skeleton(rank[, level])

Skeleton of the complex.

Attributes

allranks

All ranks.

shape

Compute shape.

property allranks#

All ranks.

Returns:
list[hashable]

The sorted list of all ranks.

get_rank(edge)[source]#

Get the rank of a hyperedge.

Parameters:
edgeIterable, Hashable or HyperEdge

The edge for which to get the rank.

Returns:
int

The rank of the given hyperedge.

property shape: tuple[int, ...]#

Compute shape.

Returns:
tuple[int, …]

A tuple representing the shape of the hyperedge.

skeleton(rank: int, level: Literal['equal', 'upper', 'up', 'lower', 'down', 'uppereq', 'upeq', 'lowereq', 'downeq'] = 'equal')[source]#

Skeleton of the complex.

Parameters:
rankint

Rank of the skeleton.

levelstr, default=”equal”

Level of the skeleton.

Returns:
list of frozensets

The skeleton of rank rank.