ash_model.utils.projections.dual_hypergraph_projection¶
- ash_model.utils.projections.dual_hypergraph_projection(h, start=None, end=None)[source]¶
The dual_hypergraph function takes a hypergraph and returns the dual of that hypergraph. The dual of a hypergraph is a hypergraph where each hyperedge becomes a node, and each node is connected to every other node in its corresponding hyperedge. The function also returns a node-to-edge mapping dictionary that maps each node in the original hypergraph to the new hyperedge ids in the dual hypergraph.