Hi,
what is the easiest way to check if the intersection of two views (of IntVar)
is empty in Gecode? My guess would be to use the range iterators for computing
intersection something like this:
bool intersects(IntVar& x0, IntVar& x1)
{
IntView view0(x0);
IntView view1(x1);
IntVarRanges vr0(view0);
IntVarRanges vr1(view1);
Iter::Ranges::Inter<IntVarRanges,IntVarRanges> i1(vr0,vr1);
return i1();
}
or is their a pre-defined helper function?
thanks,
David
This message contains information that may be privileged or confidential and is
the property of Quintiq. It is only intended for the person to whom it is
addressed. If you are not the intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute or use this message or any
part thereof. If you have received this message in error, please notify the
sender immediately and delete all copies of this message. Please note that
e-mails are susceptible to change, therefore they are not binding.
_______________________________________________
Gecode users mailing list
[EMAIL PROTECTED]
https://www.gecode.org/mailman/listinfo/gecode-users