Skip to main content

Module properties

Module properties 

Source
Available on crate feature algorithms only.
Expand description

Structural properties of a hypergraph (xgi/algorithms/properties.py).

Functions§

degree_counts
Occurrences of each degree value, index = degree, from 0 to max degree. XGI parity: degree_counts (properties.py:244-282).
degree_histogram
Observed degrees (ascending) and their counts. XGI parity: degree_histogram (properties.py:285-318).
density
Hypergraph density = existing edges / possible edges. XGI parity: density (properties.py:337-425). order/max_order are mutually exclusive (order wins); ignore_singletons drops order-0 edges.
edge_neighborhood
The edge neighbourhood of a node: the members of each edge containing it, excluding the node itself (or including it if include_self). XGI parity: edge_neighborhood (properties.py:200-241).
incidence_density
Density of the incidence matrix = nnz / (n · num_edges_considered). XGI parity: incidence_density (properties.py:428-494).
is_possible_order
Whether d is a possible order (0 ≤ d ≤ max order). XGI parity: is_possible_order (properties.py:144-161).
is_uniform
The order of uniformity if all non-singleton edges share one size, else None. XGI parity: is_uniform (properties.py:164-197) — returns d = size − 1 on success, False otherwise (mapped to None), with one documented deviation (see below).
max_edge_order
Maximum edge order (max size − 1). None for an empty hypergraph with no nodes; Some(0) when there are nodes but no edges. XGI parity: max_edge_order (properties.py:120-141), with one documented deviation (see below).
num_edges_order
Number of edges of order d (size d+1); all edges if d is None. XGI parity: num_edges_order (properties.py:92-117).
unique_edge_sizes
Unique edge sizes in ascending order. XGI parity: unique_edge_sizes (properties.py:321-334).