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.
Methods
Examples
>>> hev = tnx.HyperEdgeView()
Methods
__init__
()get_rank
(edge)Get the rank of a hyperedge.
skeleton
(rank[, level])Skeleton of the complex.
Attributes
- 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.