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.
The Appear, Disappear, Node Selection, Edge Selection, and Split costs all have an optional weight that defaults to 1, an optional attribute name that defaults to None, and an optional constant that defaults to 1. Appear and Disappear also have an optional ignore_attribute that defaults to None. EdgeDistance has a position attribute (not optional), along with the same weight and constant arguments as all the other costs.
There is a lot of duplicated code, since now all the costs essentially get the indicators for a different variable type, and then do the same things to add a constant and variable costs to the objective. The appear and disappear have some special ignore functionality, but I still think we could abstract this pretty easily into a class hierarchy to avoid the duplication. Not sure it is worth the added complexity. Thoughts @funkey @tlambert03 ?
Closes #100