-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add encapsulation dag functionality #444
Conversation
* feat: added shuffle_hyperedges + tests * feat: added shuffle_hyperedges + tests * fix: filenames * fix: tests * style: black and isort * feat: added function node_swap + test * style: black and isort * fix: error from python 3.11
* attempt at listing the available statistics * fixing previous errors * Attempt at implementing suggestions by nich * second attempt at displaying the titles * another trial * titles in bold * update of the panel for dihypergraph stats * minor fixes * change the hierarchical structure * minor change * moving MultiDi-stats in the right place * adding decorators to the admonition box * moving up the decorators
* feat: enforce equal aspect for circular layout xgi-org#430 * changed implementation of set_aspect
* refact: draw module * style: black and isort
…rkX layout functions. (xgi-org#439)
…l relations filtering function. Documentation improvements.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #444 +/- ##
==========================================
+ Coverage 90.97% 91.03% +0.06%
==========================================
Files 59 60 +1
Lines 4100 4162 +62
==========================================
+ Hits 3730 3789 +59
- Misses 370 373 +3
☔ View full report in Codecov by Sentry. |
Thanks Tim! I think the new functions still need to be added to the docs? |
Looks good to me, thanks Tim! Just a few minor comments. Also, do you think you could add short examples if not too long? Otherwise it's fine. |
Co-authored-by: Maxime Lucas <maximelucas@users.noreply.github.com>
Co-authored-by: Maxime Lucas <maximelucas@users.noreply.github.com>
Ready to go on my end now :) |
This PR adds a new file for constructing encapsulation DAGs of hypergraphs with three different kinds of relations as discussed in #413, as well as tests. Builds on #427.
I've exposed two functions:
to_encapsulation_dag(H, subset_types="all")
. Computes and returns an encapsulation DAG of the hypergraphH
. The parametersubset_types
controls the types of relations that are included in the DAG.empirical_subsets_filter(H, dag)
. Filtersdag
ofH
in place from all subset relations to only empirically maximum relations. Used internally into_encapsulation_dag(H, subset_type="empirical")
. Exposed externally so that a user can first compute and store the full DAG, then apply filtering later to a copy, i.e.:Happy to clarify anything or take suggestions for changes!