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.

Parameters:
  • h (ASH) – The ASH object to be transformed into a dual hypergraph.

  • start (int | None) – Specify the start of a time window

  • end (int | None) – SpSpecify the end of a time window

Returns:

the dual ASH and a node-to-edge mapping dictionary

Return type:

tuple