Hello everybody,

as variables in gecode need to have a domain, i want to compute the domain of 
the variables automatically, given the constraints.
I could also let the constraints restrict the domains of my variables, but as i 
understood, this is similar to propagation and could take some time.
There i want to restrict the domain manually for all unary constraints.
So, given a constraint "(a>5 /\ a<10) \/ (a>100 /\ a<105)"
the domain should be {6..9,101..104}.
Therefore i wanted to use some Gecode classes to compute the 
intersection/union/complement etc.. of the sets.
Am i right that i can use the Int::Iter::Ranges classes for this?
And second, how do they work?
So in this case, i would create a 

IntSet a1(Gecode::Iter::Ranges::MinMax(5+1,Int::Limits::max));
IntSet a2(Gecode::Iter::Ranges::MinMax(Int::Limits::min, 10-1));

And them somehow the intersection of this.
But i was neither able to initialize a set with a Range, nor to combine Ranges 
recursively.

So, how do i do this using the helping classes of gecode.

Best,
Max

-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!               
Jetzt informieren: http://www.gmx.net/de/go/freephone

_______________________________________________
Gecode users mailing list
users@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to