In answer to my own question, BoolVar extends IntVar, so the standard Gecode.count() methods will work.
Malcolm On 14/02/2008, at 4:55 PM, Malcolm Ryan wrote: > Another question: I have two lists of variables X1 ... Xn and Y1 ... > Yn. I want to constrain them so that at most one (or exactly one) of > the Xi's differs from the corresponding Yi. > > This is one of those things that would propagate better with a > specialised constraint. Does such a constraint exist (in Gecode/J)? > > If we had booleans Bi = (Xi = Yi), this could be represented by a > constraint which said that at most (or exactly) one Bi was true. Does > such a constraint exist? > > Malcolm > > -- > "If there is one thing worse than the modern weakening of major morals > it is the modern strengthening of minor morals. > Thus it is considered more withering to accuse a man > of bad taste than of bad ethics." -- G.K.Chesterton, On Lying > in Bed > > > > > _______________________________________________ > Gecode users mailing list > [EMAIL PROTECTED] > https://www.gecode.org/mailman/listinfo/gecode-users -- "Progress should mean that we are always changing the world to fit the vision, instead we are always changing the vision." - G.K.Chesterton, Orthodoxy _______________________________________________ Gecode users mailing list [EMAIL PROTECTED] https://www.gecode.org/mailman/listinfo/gecode-users