[gecode-users] operator = for NaryUnion
Christian Schulte
cschulte at kth.se
Thu Jul 11 19:24:11 CEST 2013
Hi, fixed in the trunk, patch is attached. Christian
--
Christian Schulte, www.ict.kth.se/~cschulte/
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Farshid Hassani Bijarbooneh
Sent: Thursday, July 11, 2013 6:01 PM
To: users at gecode.org
Subject: [gecode-users] operator = for NaryUnion
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?
Cheers,
Farshid
_______________________________________________
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/20130711/1d579153/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL: <http://www.gecode.org/pipermail/users/attachments/20130711/1d579153/attachment-0001.txt>
More information about the users
mailing list