Hi, Folks: I am wondering whether there is a way to post a constraint on the number of unique elements in a array, e.g
I have an IntVarArray, and it may has some identical elements, say it could be [1, 1, 2, 3, 4, 4], and the number of unique elements is 4, since there are 2 "1"s and 2 "4" which are both redundant. If I want to constrain that for a given IntVarArray, it number of unique element can not exceed some value, how can I do that? I checked "modelling with gecode", seems there is "count" for constraining the number of appearance of elements. Thanks -- -------------------------------------------- Changbin Liu Computer & Information Science Department University of Pennsylvania Philadelphia, PA U.S.
_______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users
