How on earth should that work: you use a vector of integers (that is,
vector<int>) to initialize an array of integer VARIABLES that is,
(IntVarArgs).

 

You really need to read MPG more carefully. Maybe you meant IntArgs as an
array of integers?

 

Christian

 

--

Christian Schulte, Professor of Computer Science, KTH,
www.ict.kth.se/~cschulte/

 

From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf
Of peter Tomson
Sent: Wednesday, October 02, 2013 6:26 AM
To: users@gecode.org
Subject: [gecode-users] Fwd: Initialize IntVArArgs from variable array a

 

 

---------- Forwarded message ----------
From: peter Tomson <pikapikanaou...@gmail.com>
Date: 2013/10/2
Subject: Re: [gecode-users] Initialize IntVArArgs from variable array a
To: Guido Tack <t...@gecode.org>



Hi 

 

Sorry to be so bothring but this instruction that YOU gave me : IntVarArgs
x(v); doesn't work for me!!!!

 

let me explain: by just writing this instruction in the model it gave me
also an error because none of the declaration that exist in the site of
Gecode does match the argument list????

 

this is what i wrote : vector<int> W;

for (int i=0;i< 10;i++)

W.push_back(i);

             IntVarArgs R(W);

 

i konw there is a mistack here but i don't konw what is it ??? I'm really
new with Gecode that's why i do so my errors 

So sorry to be so bothring 

 

Thank YOU for any help at all 

 

PETER

 

2013/10/2 Guido Tack <t...@gecode.org>

Hi,

I think you need to brush up on your C++, that's the type signature, not the
code you should write.  Just check our documentation, you can construct an
IntVarArgs from a vector v like this IntVarArgs x(v);

Cheers,
Guido


On 02/10/2013, at 1:21 PM, peter Tomson <pikapikanaou...@gmail.com> wrote:

> hi all !
>
> in my model i have to get the interger variables from a vector , So i used
this code that i found in MPG :
>
> IntVarArgs (const std::vector< IntVar > &a);
>
> but i have an error about the const : type name not allowed!!!!!!!!!!
>
> honnestly i declared an IntVarArray R, after that i wrote that code, So do
i do any thing wrong ??? Do i mis ay thing ??
>
> Thank you very much for your hepl
>
> PETER
>

> _______________________________________________
> Gecode users mailing list
> users@gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users

 

 

_______________________________________________
Gecode users mailing list
users@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to