You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is a really great project!
However, I met some issues in the process. Is this package able to deal with a directed hypergraph or not? Because in the hypergraph, I still want to remain the directed graph structure.
Confirming the current status: directed hypergraph is not yet implemented.
dhg/structure/hypergraphs/directed_hypergraph.py is an empty file (0 bytes)
BaseHypergraph declares abstract methods like _add_hyperedge and _merge_hyperedges that support v2e/e2v direction parameters, but no concrete DiHypergraph class exists
dhg/__init__.py does not export a DiHypergraph
For now, if you need directed high-order relationships, a workaround is to use DiGraph with clique expansion from a hypergraph via Graph.from_hypergraph_clique, though this loses the hyperedge structure. The directed hypergraph implementation would be a significant feature addition.
Activity
HWH-2000 commentedon Feb 26, 2024
I have the same question
dtchang commentedon Apr 18, 2024
Please add support for directed hypergraph asap (see #31). Thanks.
yifanfeng97 commentedon Aug 2, 2026
Confirming the current status: directed hypergraph is not yet implemented.
dhg/structure/hypergraphs/directed_hypergraph.pyis an empty file (0 bytes)BaseHypergraphdeclares abstract methods like_add_hyperedgeand_merge_hyperedgesthat support v2e/e2v direction parameters, but no concreteDiHypergraphclass existsdhg/__init__.pydoes not export aDiHypergraphFor now, if you need directed high-order relationships, a workaround is to use
DiGraphwith clique expansion from a hypergraph viaGraph.from_hypergraph_clique, though this loses the hyperedge structure. The directed hypergraph implementation would be a significant feature addition.