[gecode-users] very odd bug in small program

Chris Mears chris.mears at monash.edu
Mon Sep 27 06:22:20 CEST 2010


Hi Denys,

I think the problem is that the Matrix constructor copies the IntArgs
array, so that when you modify MC you aren't changing C itself.
(Whether it ought to do this or not is another question.)  One
solution is to instead write:

  IntArgs C(4*4, 7, 1, 3, 4, 8, 2, 5, 1, 4, 3, 7, 2, 3, 1, 6, 8);
  linear(*this, C, X, IRT_EQ, N);

Cheers,
Chris



More information about the users mailing list