-
Notifications
You must be signed in to change notification settings - Fork 30
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
DiHypergraph class #372
DiHypergraph class #372
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
This cleans up PR #297, which I will now close. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #372 +/- ##
==========================================
+ Coverage 90.90% 91.11% +0.21%
==========================================
Files 42 46 +4
Lines 3177 3771 +594
==========================================
+ Hits 2888 3436 +548
- Misses 289 335 +46
☔ View full report in Codecov by Sentry. |
I believe that I implemented everything that we discussed, so should be ready for review. |
Okay this is a long PR so it's hard to check everything in detail. A few thoughts:
Otherwise, as we said, I'd be okay to release this and flag this in the docs as an experimental feature, and try it in the real world. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of awesome work here. Agree with Max, there's definitely a lot of duplicated code with Hypergraph.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of awesome work here. Agree with Max, there's definitely a lot of duplicated code with Hypergraph.
1./2. I agree. The eventual goal is to figure out some kind of inheritance. That being said, because we have spent so much time polishing the Hypergraph class, I wanted to keep the two classes separate until we test this in the wild. |
Okay, I think that this should be good to go pending the questions that I was unsure of. Thank you both for taking the time to review such a large PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome Nich. We do need a plan for determining when this class will be "ready", since for now we are adding it as an experimental feature.
Do any of yall @nwlandry @maximelucas plan on making heavy use of this class? It needs to be battle tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome Nich. We do need a plan for determining when this class will be "ready", since for now we are adding it as an experimental feature.
Do any of yall @nwlandry @maximelucas plan on making heavy use of this class? It needs to be battle tested.
Good idea. What are standard ways?
At the moment I don't. |
Thanks! I am planning on using it for a project on metabolic networks and I'm certainly hoping to make large use of this class. Great question. I'm not sure I can think of a concrete milestone to say when it's ready, but roughly speaking, it would be great to have a lot of the same functionality as Hypergraph (algorithms, drawing, etc.) and a stable internal representation before it's considered ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the new tests Nich!
Oh btw, before merging, is it written anywhere that it's an experimental feature? |
Great point. I will add this to the documentation of the |
Okay, I added warnings to the DiHypergraph, DiEdgeView, and DiNodeView classes. I will merge once all the tests pass! |
This is a preliminary attempt at addressing #2. Currently the following are implemented:
convert_to_dihypergraph
in the convert moduleempty_dihypergraph
in the classic generatorsDiNodeView
andDiEdgeView
with members, memberships, filterby, and other standard class methodsDiNodeStat
,DiEdgeStat
,MultiDiNodeStat
,MultiDiEdgeStat
are now implementeddegree
,in_degree
,out_degree
,size
,order
,tail_size
,head_size
are implementedI added Tutorial 8 to demonstrate some of this basic functionality.