MCPcopy Create free account
hub / github.com/Gecode/gecode / post

Method post

gecode/int/dom/set.hpp:54–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53 template<class View, ReifyMode rm>
54 ExecStatus
55 ReIntSet<View,rm>::post(Home home, View x, const IntSet& s, BoolView b) {
56 if (s.ranges() == 0) {
57 if (rm == RM_PMI)
58 return ES_OK;
59 GECODE_ME_CHECK(b.zero(home));
60 } else if (s.ranges() == 1) {
61 return ReRange<View,rm>::post(home,x,s.min(),s.max(),b);
62 } else if (b.one()) {
63 if (rm == RM_PMI)
64 return ES_OK;
65 IntSetRanges i_is(s);
66 GECODE_ME_CHECK(x.inter_r(home,i_is,false));
67 } else if (b.zero()) {
68 if (rm == RM_IMP)
69 return ES_OK;
70 IntSetRanges i_is(s);
71 GECODE_ME_CHECK(x.minus_r(home,i_is,false));
72 } else {
73 (void) new (home) ReIntSet<View,rm>(home,x,s,b);
74 }
75 return ES_OK;
76 }
77
78
79 template<class View, ReifyMode rm>

Callers

nothing calls this directly

Calls 8

postFunction · 0.50
rangesMethod · 0.45
zeroMethod · 0.45
minMethod · 0.45
maxMethod · 0.45
oneMethod · 0.45
inter_rMethod · 0.45
minus_rMethod · 0.45

Tested by

no test coverage detected