Hi,

 

No, not all. For the details please read chapter 25 in MPG, it has the full
story!

 

The difference (in short) is that nq removes a single integer value, whereas
minus_r removes a whole set of values represented by a range iterator. As
said, please check MPG.

 

Christian

 

--

Christian Schulte,  <http://www.gecode.org/~schulte> www.gecode.org/~schulte


Professor of Computer Science, KTH,  <mailto:cschu...@kth.se>
cschu...@kth.se

Expert Researcher, SICS,  <mailto:cschu...@sics.se> cschu...@sics.se

 

From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf
Of mehdi m
Sent: Tuesday, November 10, 2015 08:36 PM
To: users@gecode.org
Subject: [gecode-users] Difference between minus_r and nq

 

Hi everyone,

 

In the propagator implementation are the two following methods to remove
values from domains equivalents ?

 

- method 1 :

Int::ViewRanges<Int::IntView> r(x1);

GECODE_ME_CHECK(x0.minus_r(home, r));

 

- method 2

GECODE_ME_CHECK(x0.nq(home, val));

 

Or there is any difference ? I see that the first one takes a ViewRange and
the second can takes an Int directly but what about correctness and
efficiency of pruning ?

 

Thanks.

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

Reply via email to