[gecode-users] Dynamic creation of IntVarArgs
Guido Tack
tack at ps.uni-sb.de
Tue Dec 2 13:56:20 CET 2008
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
More information about the gecode-users
mailing list