Skip to content
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

Generalize costs #54

Merged
merged 4 commits into from
Jan 22, 2024
Merged

Generalize costs #54

merged 4 commits into from
Jan 22, 2024

Conversation

bentaculum
Copy link
Collaborator

  • Generalizes the signature of costs Split and Appear to the weight, attribute, constant format of other costs. This now optionally allows for variable costs for these events.
  • Adds an optional constant the EdgeDistance cost. Here the signature is positional_attributes, weight, constant, since positional_attributes is a compulsory argument.
  • Updates the API test to cover these changes.

@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (56469ee) 92.91% compared to head (1722dab) 93.37%.
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #54      +/-   ##
==========================================
+ Coverage   92.91%   93.37%   +0.46%     
==========================================
  Files          32       32              
  Lines         762      770       +8     
==========================================
+ Hits          708      719      +11     
+ Misses         54       51       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@funkey
Copy link
Member

funkey commented Sep 14, 2023

Thanks a lot for that! This looks good to me, with the exception of constant for EdgeDistance. This can already by done through EdgeSelection and would be redundant.

- Cover variable costs for Appear and Split
- Fix _selected_edges and _selected_nodes convenience functions
- Remove unittest dependency
@bentaculum
Copy link
Collaborator Author

Good point. I removed this redundancy and updated the test accordingly.

@bentaculum
Copy link
Collaborator Author

Hi @funkey, ok to merge this?

@funkey
Copy link
Member

funkey commented Jan 22, 2024

Sorry for the delay. Yes, looks good, thanks a lot! :)

@funkey funkey merged commit 54aa2c1 into main Jan 22, 2024
13 checks passed
@cmalinmayor cmalinmayor deleted the generalize_costs branch February 29, 2024 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants