Available on crate feature
convert only.Expand description
Conversions to/from hyperedge lists/dicts, bipartite edgelists, bipartite petgraph graphs, the 1-skeleton graph, and order-cutting. (XGI 1.0 dropped its hypergraph dict; so did this module.)
Ported from xgi/convert/. Operates on the default Hypergraph
(serde_json::Value attrs). The pandas slice is NOT ported (spec §4.4); HIF,
encapsulation-DAG, line-graph, simplex, and incidence conversions are deferred
(see the Phase-6 plan open questions).
Structs§
- Bipartite
Node - A vertex of a bipartite representation: an id plus a layer marker.
Enums§
- Convert
Error - Errors raised by conversion functions.
Functions§
- cut_
to_ order - A copy of the hypergraph keeping only edges of order ≤
order. - from_
bipartite_ edgelist - Build a hypergraph from a bipartite edgelist of
(node, edge)pairs. - from_
bipartite_ graph - Reconstruct a hypergraph from a bipartite petgraph graph.
- from_
hyperedge_ dict - Build a hypergraph from an id→members dict (preserving ids).
- from_
hyperedge_ list - Build a hypergraph from a list of hyperedges (auto-generated ids).
- to_
bipartite_ edgelist - Extract a bipartite edgelist of
(node, edge)pairs (edge order, then member order). - to_
bipartite_ graph - Build a bipartite petgraph graph: node-layer + edge-layer vertices, one arc per membership (node -> hyperedge).
- to_
graph - The unweighted 1-skeleton (graph projection) of the hypergraph.
- to_
hyperedge_ dict - Extract the id→members dict (edge insertion order).
- to_
hyperedge_ list - Extract the hyperedge list (members per edge, edge insertion order).