[gecode-users] Dynamic creation of IntVarArgs
Max
chaosangel at gmx.de
Tue Dec 2 12:51:42 CET 2008
Hello everybody,
i wanted to create an IntVarArgs array for using linear constraints.
I need this array in an recursive function where the size is calculated
at the end of the recursion(recursion size == array size).
Now i found out that a can not dynamically create an IntVarArgs or an
IntArgs.
This, seems reasonable, because i would have to destroy it somewhere,
and i don't know if gecode copies the reference it gets in the linear
call(i don't think so and it would be better not to do so).
BUT:
Why can i not create an IntVarArgs array without size and initializing
it with a size at a later time.
Without that, i would have to recurse my tree two times, one time for
evaluating the size of the array, and one time to fill it. This is bad.
Do i have overseen something ? Why is this feature not supported.
Any ideas how to solve my problem?
Thanks in advance.
Max
More information about the gecode-users
mailing list