Skip to content

How to get a directed hypergraph #47

Open

Description

@whyydsforever

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.

Activity

  1. HWH-2000 commented on Feb 26, 2024

    @HWH-2000

    I have the same question

  2. dtchang commented on Apr 18, 2024

    @dtchang

    Please add support for directed hypergraph asap (see #31). Thanks.

  3. self-assigned this
    on Dec 31, 2025
  4. yifanfeng97 commented on Aug 2, 2026

    @yifanfeng97
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions