Edge types#160
Conversation
|
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.36% +2.44%
==========================================
Files 32 40 +8
Lines 805 962 +157
==========================================
+ Hits 756 927 +171
+ Misses 49 35 -14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Jan says: Add "Cost" at the end of all the cost classes, as it is explicit. |
funkey
left a comment
There was a problem hiding this comment.
All good, just pending renaming as discussed offline.
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?