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

Model.intVar() should accept enumerated domains provided in bitsets #1120

Open
fhermeni opened this issue Dec 13, 2024 · 0 comments
Open

Model.intVar() should accept enumerated domains provided in bitsets #1120

fhermeni opened this issue Dec 13, 2024 · 0 comments

Comments

@fhermeni
Copy link
Contributor

int[] is a confortable approach to state the domain but

  1. in terms of memory usage it is not necessarily concise
  2. it requires the solver to clone the array which can be costly (refer to point 1 as well)
  3. eventually, it is only used to populate a backtrackable bitset when we use a BitsetIntVarImpl backend

It would be great to be able to provide a bitset

  1. more concise
  2. faster and cheaper clone if needed
  3. can be reused by the caller given it is more flexible than an int[]
  4. no need to sort
  5. it should speed up BitsetIntVarImpl initialisation using bitset magic
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

No branches or pull requests

1 participant