[gecode-users] operator = for NaryUnion
Farshid Hassani Bijarbooneh
farshid.hassani at gmail.com
Thu Jul 11 18:00:36 CEST 2013
Hi,
In Gecode 4.1 creating n-ary union of variable ranges and assigning to a NaryUnion causes a segmentation fault, whereas in Gecode 3.7.3 it seems to work:
Region myRegion(*this);
Iter::Ranges::NaryUnion narr[2];
IntVarRanges* varRange = myRegion.alloc<IntVarRanges>(x.size()); // x is IntVarArray variables of the model
for (int r=0; r < x.size(); r++) {
varRange[r].init(x[r]);
}
narr[0] = Iter::Ranges::NaryUnion(myRegion, varRange, x.size());
If we instead create only one NaryUnion then it works fine in Gecode 4.1:
Iter::Ranges::NaryUnion uni(myRegion, varRange, x.size());
I also attached a minimal code demonstrating this issue. Do you think if there is something I'm missing here?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test5.cpp
Type: application/octet-stream
Size: 1517 bytes
Desc: not available
URL: <http://www.gecode.org/pipermail/users/attachments/20130711/a62d57c0/attachment.obj>
-------------- next part --------------
Cheers,
Farshid
More information about the users
mailing list