-
Notifications
You must be signed in to change notification settings - Fork 13
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
Contraction tree to graph #53
Conversation
Thanks @JoeyT1994! It's a very good question you bring up about what the type should be. I would prefer to not introduce a new type, and I'm hoping with good generic code and good function names we can make it clear when a function should be used on a tree graph (i.e. a |
Finally, even though we have that vertex naming convention, it may be better to try to write code that is written for generic graphs and/or tree graphs that don't have any special vertex naming convention, even if the code is a bit slower in principle. That way we build out useful tools for working with general tree graphs, and we can always make specialized functions that make use of the vertex naming convention for cases where it actually makes a performance difference. |
Codecov Report
@@ Coverage Diff @@
## main #53 +/- ##
==========================================
- Coverage 76.47% 76.38% -0.10%
==========================================
Files 52 54 +2
Lines 2725 2782 +57
==========================================
+ Hits 2084 2125 +41
- Misses 641 657 +16
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Looks good, thanks again! |
This PR adds functionality for converting a contraction sequence (outputted by
contraction_sequence(tn)
) to a graph.Testing is also included.
It is possible the output (which is just a
NamedGraph
) should be defined as it's owntype
so that methods likeleaf_node
can be assigned explicitly to it.