ash_model.utils.networkx.from_networkx_bipartite¶
- ash_model.utils.networkx.from_networkx_bipartite(graph, start, end=None, keep_attrs=False)[source]¶
Convert a bipartite NetworkX Graph into an ASH where one node set becomes hyperedges and the other set becomes nodes. Edges connect hyperedges to their nodes.
- Parameters:
- Raises:
ValueError – If the graph is not bipartite.
- Returns:
ASH with hyperedges corresponding to bipartite partitions.
- Return type: