|
|
|
|
|
by klyrs
646 days ago
|
|
> A hypergraph is clearly a data structure which demands a lot of cyclic references... Does it? The easiest data structure is a 2d array with rows corresponding to nodes and columns corresponding to edges. If nodes aren't allowed to touch an edge more than once, it's just a matrix of bools. No references needed! |
|
But yes, a hypergraph will have a lot of vertices referencing each other along (hyper)edges, however you choose to implement it. These can, and often do, form cycles, so again, no matter how the implementation is constructed, it has to handle that.
You'll have to check out the source for details on how this one is implemented, I wouldn't dream of spoiling the fun.