[gecode-users] Creating an empty IntSet?

Malcolm Ryan malcolmr at cse.unsw.edu.au
Tue Nov 6 11:58:05 CET 2007


On 05/11/2007, at 6:47 PM, Guido Tack wrote:

> Mikael Zayenz Lagerkvist wrote:
>
>> In C++ there is a constructor for creating the empty InSet, as  
>> well as
>> a static member representing the empty set. Since we did not include
>> either in Gecode/ (an oversight), you can use the fact that, IIRC,
>> IntSet(1, 0) will create an empty IntSet.
>
> I'm afraid there's a bug in the current version of the IntSet  
> constructor.  You can however construct the empty set using IntSet 
> (new int[0]).

It would be good if an IntSet had accessor methods to see what  
elements are in it (if any). At the moment they are totally opaque.

Malcolm

--
      "The Christian ideal has not been tried and found wanting;
       it has been found difficult and left untried."
             - G.K.Chesterton, What's Wrong With The World







More information about the gecode-users mailing list