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

Add int_var_with_integer_list_domain #52

Closed

Conversation

elliot-laster-ezc
Copy link
Contributor

Adds the ability to define an int var with a list of integers as a domain. Don't love the long method name, and maybe we could use overloading?

@ankane
Copy link
Owner

ankane commented Oct 17, 2023

Hi @elliot-laster-ezc, thanks for the PR! It looks like Python uses:

z = model.NewIntVarFromDomain(cp_model.Domain.FromValues([2, 3, 4, 7]), "z")

so think we should go with:

z = model.new_int_var_from_domain(ORTools::Domain.from_values([2, 3, 4, 7]), "z")

for consistency. Also, please leave out the changes to .gitignore.

@ankane
Copy link
Owner

ankane commented Nov 17, 2023

Cleaning up stale PRs

@ankane ankane closed this Nov 17, 2023
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.

2 participants