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

Constraint hashcode equals fix #210

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

jyluo
Copy link

@jyluo jyluo commented Jan 29, 2019

This PR fixes #206. It updates the hashcode and equals methods of the constraints and adds a test suite to ensure the methods work as expected.

In addition, changed ExistentialConstraint to take sets of constraints as its arguments instead of lists of constraints. This ensures efficient encoding and comparison of ExistentialConstraints.

Changed PreferenceConstraint to not hash or compare on the weight value, since there should never be more than 1 PreferenceConstraint for the same variable and goal.

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.

Constraints need to be hashed correctly
2 participants