[gecode-users] sizes of arguments arrays mismatch

Guido Tack tack at gecode.org
Mon Jan 20 12:08:44 CET 2014


Well what do you want to do?  The following works for example:
      IntVarArgs D(*this, n*m, 0,1);
      Matrix<IntVarArgs> m(D,n,m);
The following works, too:
      IntArgs D(n*m);
      Matrix<IntArgs> m(D,n,m);

Cheers,
Guido


On 20 Jan 2014, at 9:51 pm, mehdi m <medistif at hotmail.fr> wrote:

> I read the documentation, there are no details on the declaration of a matrix IntArgs. I tried to declare D as follows: 
> IntVarArgs D (* this, * nbrTransaction nbrMotifs); 
> it does not work either.
> 
> Cheers,
> Mehdi
> 
> Subject: Re: [gecode-users] sizes of arguments arrays mismatch
> From: tack at gecode.org
> Date: Mon, 20 Jan 2014 10:20:46 +1100
> CC: users at gecode.org
> To: medistif at hotmail.fr
> 
> Please read the documentation again, all the constructors are described there in detail (did you mix up IntArgs and IntVarArgs?).
> 
> Cheers,
> Guido
> 	
> On 19 Jan 2014, at 7:41 pm, mehdi m <medistif at hotmail.fr> wrote:
> 
> 
> ok, but when  try to initialize D to size n*m, the type IntArgs accept one parameter such as IntArgs( int n).  i tried to do this : D (*this, n*m,0,1) it doesn't work.
> 
> Thank you. 
> Mehdi
> Subject: Re: [gecode-users] sizes of arguments arrays mismatch
> From: tack at gecode.org
> Date: Sun, 19 Jan 2014 09:49:58 +1100
> CC: users at gecode.org
> To: medistif at hotmail.fr
> 
> You need to initialise D to size n*m before passing it to the Matrix constructor (the error says exactly that, the sizes don't match).
> 
> Cheers,
> Guido
> 
> On 19 Jan 2014, at 8:45 am, mehdi m <medistif at hotmail.fr> wrote:
> 
> Hello everyone,
> in my model i have a problem, a try to use create a matrix such as :
> 
> const int n=5;
> const int m=10;
> 
> IntArgs D;
> 
> Matrix <IntArgs> bdd (D , n, m);
> 
> i need the type IntArgs in my model.
> 
> this gives me  an error :
> 
> Exception: Matrix::Matrix(A, w, h): Sizes of argument arrays mismatch stopping.
> 
> if someone has an idea, thank you.
> 
> Mehdi.
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20140120/a3816a66/attachment.html>


More information about the users mailing list