toponetx.ColoredHyperEdgeView#

class toponetx.ColoredHyperEdgeView[source]#

Bases: AtomView

A class for viewing the cells/hyperedges of a colored hypergraph.

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 given hyperedge.

skeleton(rank[, store_hyperedge_key])

Skeleton of the complex.

Examples

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

Methods

__init__()

get_rank(edge)

Get the rank of a given hyperedge.

skeleton(rank[, store_hyperedge_key])

Skeleton of the complex.

Attributes

allranks

All ranks.

shape

Compute shape.

property allranks: list[int]#

All ranks.

Returns:
list[int]

The sorted list of all ranks.

get_rank(edge)[source]#

Get the rank of a given hyperedge.

Parameters:
edgeIterable, Hashable or ColoredHyperEdge

The edge for which to get the rank.

Returns:
int

The rank of the given colored hyperedge.

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

Compute shape.

Returns:
tuple[int, …]

The shape of the ColoredHyperEdge.

skeleton(rank: int, store_hyperedge_key: bool = True)[source]#

Skeleton of the complex.

Parameters:
rankint

Rank of the skeleton.

store_hyperedge_keybool, default=True

Whether to return the hyperedge key or not.

Returns:
list of frozensets

The skeleton of rank rank.