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

implement cliff scorer #12

Merged
merged 6 commits into from
Oct 20, 2024
Merged

implement cliff scorer #12

merged 6 commits into from
Oct 20, 2024

Conversation

NicMcPhee
Copy link
Member

Implement a simple "cliff scorer", where solutions whose weight exceeds the capacity of the knapsack get a "minus infinity" score, i.e., ::MIN.

Closes #3

This still needs to have the actual scoring mechanism implemented.
This also changed the return type of `Knapsack::capacity()` to `u64`.
We also removed specific type references in the parser so it will be easier to refactor later.

We added tests for the new `value()` and `weight()` methods, and indirect tests for `new()`.
@NicMcPhee NicMcPhee added this pull request to the merge queue Oct 20, 2024
Merged via the queue into main with commit b7dd8d2 Oct 20, 2024
1 check passed
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.

Implement cliff scorer
1 participant