Thank you very much. Its a good idea. The overhead of copying should be not that big. But maybe i'm not that lazy and rewrite my code that it precomputes the linear relation size.
Thanks. Max Guido Tack wrote: > Max wrote: > > >> Yes, of course i can do this (and have to do this), >> but my tree is an abstracted form that should not know about linear >> constraints or not. >> An resize function would be much easier. >> > > If you just want to get it done quickly, simply collect the vars in an > std::vector<IntVar>, and then after walking the tree copy the vector > to an IntVarArgs. There's nothing wrong with keeping IntVars in data > structures other than the ones we provide, you just have to get them > in the right shape for passing them to our post functions. > > Cheers, > Guido > > > _______________________________________________ > Gecode users mailing list > [EMAIL PROTECTED] > https://www.gecode.org/mailman/listinfo/gecode-users > > _______________________________________________ Gecode users mailing list [EMAIL PROTECTED] https://www.gecode.org/mailman/listinfo/gecode-users
