xgi-org / xgi

CompleX Group Interactions (XGI) is a Python package for higher-order networks.
https://xgi.readthedocs.io
Other
187 stars 32 forks source link

Inheritance for hypergraph classes #379

Open nwlandry opened 1 year ago

nwlandry commented 1 year ago

We should have Hypergraph inherit from DiHypergraph or vice-versa as well as IDView/DiIDView to avoid overly duplicated code.

nwlandry commented 6 months ago

Some thoughts on this:

We should start by implementing a HigherOrderSystem (HOrS) class with some basic functionality.

All higher-order networks have:

For example, interactions can be modeled as a:

My thought is that we can implement all of the general things except for the edges in the base class and write interaction type-specific functionality in the inherited classes.

nwlandry commented 6 months ago

PR #541 implements the third item. Item 2 is fairly low priority, but when we implement this, Counter might be preferable to a sorted list.