[gecode-users] SetVar::init private?

Guido Tack tack at gecode.org
Tue May 25 18:43:37 CEST 2010


Denys Duchier wrote:

> why is it that the init methods of SetVar are private?  I was hoping to
> create a SetVarArray, but then initialize individual elements
> separately.  It is possible to do that for IntVars.  Is there something
> special about SetVars that makes this impossible?

No, I just didn't see why it's necessary to have the methods since you can do

SetVarArray x(home,n);
for (int i=n; i--;)
  x[i] = SetVar(home,...)

And currently, the init methods don't throw exceptions if the arguments are not within limits.  I'll add that for the next release and make them public.

Cheers,
	Guido

-- 
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/






More information about the users mailing list