hi, There have two questions which have puzzled me for a short long time. They are as follows:
1. the difference bettween IntVarArray and IntVarArgs ,and how to use them As explained in the manual of Gecode, IntVarArgs is Argument array which is just good enough for passing arguments with automatic memory management. IntVarArray is Variable array which can store variables and be used for storing the variables being part of a solution (script). From these description,i can see that IntVarArgs can be used when i need automatic memory management.But When i need automatic memory management, i don't know. If you give me an simple example, i maybe can understand it. 2. how to post the constraint ----multiplication of two variable? For instance , IntVarArry x; x(*this,4,1,6); I want to have a constraint " x[0] * x[1] = x[2] ".when i write " post(*this, x[0] * x[1] == x[2],o pt.icl( ) );" in my test program, errors come out. I began to doubt that whether you can use the sign of " * ". After testing " post(*this, 2 * x[1] == x[2],o pt.icl( ) );", i have know that i can use " * ". So, I doubt that we can't multiply two variable with the sign " * ". Who can tell me how to add this constraint ? Thanks your help. Kayler
_______________________________________________ Gecode users mailing list us...@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users