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

Method post

gecode/int/circuit/dom.hpp:113–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111
112 template<class View, class Offset>
113 ExecStatus
114 Dom<View,Offset>::post(Home home, ViewArray<View>& x, Offset& o) {
115 int n = x.size();
116 if (n == 1) {
117 GECODE_ME_CHECK(o(x[0]).eq(home,0));
118 } else if (n == 2) {
119 GECODE_ME_CHECK(o(x[0]).eq(home,1));
120 GECODE_ME_CHECK(o(x[1]).eq(home,0));
121 } else {
122 for (int i=0; i<n; i++) {
123 GECODE_ME_CHECK(o(x[i]).gq(home,0));
124 GECODE_ME_CHECK(o(x[i]).le(home,n));
125 GECODE_ME_CHECK(o(x[i]).nq(home,i));
126 }
127 (void) new (home) Dom<View,Offset>(home,x,o);
128 }
129 return ES_OK;
130 }
131
132}}}
133

Callers

nothing calls this directly

Calls 6

oFunction · 0.50
sizeMethod · 0.45
eqMethod · 0.45
gqMethod · 0.45
leMethod · 0.45
nqMethod · 0.45

Tested by

no test coverage detected