Edge types#160
Open
cmalinmayor wants to merge 14 commits into
Open
Conversation
Contributor
Author
|
Upon further discussion about API with Jan, it is too difficult to support generic EdgeGroups, because it breaks the singleton Variable pattern. Instead, the user can just directly specify the groups they want by creating a new variable, as with the continuation cost. (Alternatively, we could have a factory function that makes the variable and cost... but this is not necessary). The tricky part is just defining the edge semantics so that we can attach the costs specifically to continuation, or division. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #160 +/- ##
==========================================
+ Coverage 93.91% 96.14% +2.23%
==========================================
Files 32 38 +6
Lines 805 909 +104
==========================================
+ Hits 756 874 +118
+ Misses 49 35 -14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove hyperedges and implement edge types - Continuation, Merge, and Split edges.
Closes #127 , closes #107 , closes #104
New Features:
Breaking changes:
Questions about naming:
Options:
a. Variable and Cost share the same name:
EdgeSplit, EdgeMerge. We never expose in the global namespace, and users don't access variables directly unless they are extending a custom cost. Then, the usage would befrom motile import variables; variables.EdgeSplit(...)b. Keep Cost at the end of the Costs -> EdgeSplitCost, EdgeMergeCost - Hate this one but it is clear
c. Add "Var" or something at the end of the variables. This avoids any possible name collision, keeps Costs clean as the most commonly used API, and isn't too messy/long.
Question about TrackingGraph:
Now that we have removed hyperedges, is there still a reason to store local node and edge dicts isntead of a networkx graph, which is essentially node and edge dicts?