Hi, that's not what I meant, but it's even better (my idea was to just look at the incoming AST::Array and check if you've seen the same array before, but with your idea you save that check).
Cheers, Guido On 26/09/2012, at 5:41 PM, Andrea Pretto <a.pre...@miriade.it> wrote: > Thanks. > Yes, I'm worried about performance (memory consumption). The arrays are very > large, and there are many constraint invocation. > > For the "global hash table" approach, I thought something like this: > > % flatzinc > predicate my_declare_param(int: param_id, array[int] of int: params1, > array[int] of int: params2); > > predicate my_con(var int: x, var int: y, var int: param_id); > > ... > > my_declare_param(3, [1,2,3,4,..], [1,2,3,4..]) > my_con(a, b, 3) > > % end flatzinc > > I add a predicate my_declare_param for registering params, wich "register" > (in a global map) the parameters giving them and ID wich is PARAM_ID as > argument. > Then in the constraint (instead of arrays) I give the ID (PARAM_ID above) to > specify which parameters declared before I want to use. > > Is that did you mean ?? > > Thanks in advance. > Cheers. _______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users