ibex-team / ibex-lib

IBEX is a C++ library for constraint processing over real numbers.
http://ibex-team.github.io/ibex-lib/
GNU Lesser General Public License v3.0
69 stars 51 forks source link

How to build predecessor and successor vectors with Choco #462

Closed diegomartinop closed 4 years ago

diegomartinop commented 4 years ago

Hi.

I'm using Choco Solver in Java and I'm working with a problem in which I have a binary vector like this:

v = 0 0 0 1 0 1 0 0 1

and I wish to create two new vectors from this binary vector with the respectives predecessor and successor in which v is true (i.e., v[i] = 1). The results shoud be like this:

pred = -1 -1 -1 0 -1 3 -1 -1 5 succ = -1 -1 -1 5 -1 8 -1 -1 0

in which -1 indicates that v[i] = 0 and the others numbers are the respectives predecessor and successor nodes regarding the vector v.

I tried to use inverseChanneling() and reification() but without success. Anybody has any idea of how to do that?

Thank you.

gchabert commented 4 years ago

I think you're not on the right repository. Please submit it to choco : https://github.com/chocoteam/choco-solver

diegomartinop commented 4 years ago

I think you're not on the right repository. Please submit it to choco : https://github.com/chocoteam/choco-solver

Thank you