JuliaGraphs / JuliaGraphs/GraphsBase.jl

Hypergraphs

Open
#23 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Julia
Stars
11
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Is there any intention to support hypergraphs? The main deadlock to integrate hypergraphs in Graphs is the assumption that edges point to 2 vertices. Currently is weird to implement a "undirected" HyperEdge type: dst and src have no point there (even in an undirected graph dst and src look weird) because there will be more than 2 vertices.

My proposal is the following:

  1. See simple edges as a special case of hyperedges whose cardinality is 2.
  2. Stop using dst and src for undirected edges $\rightarrow$ Use vertices(edge) where possible instead.
  3. For graph algorithms that need a non-hyper graph view, a hyperedge can be seen as the powerset of cardinality 2 of the connecting vertices (i.e. all vertices in an hyperedge are at distance 1).

If we relax this assumption, open edges could also be supported and implemented as cardinality 1 hyperedges.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the GraphsBase.jl interfaces that assume edges connect exactly two vertices, especially uses of dst, src, and vertices(edge). Compare the three proposed changes and determine a consistent hyperedge model; done means the design is agreed and hypergraphs, open edges, and non-hypergraph algorithm views are supported without breaking existing edge behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.