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

Method post

gecode/int/circuit/val.hpp:79–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77
78 template<class View, class Offset>
79 ExecStatus
80 Val<View,Offset>::post(Home home, ViewArray<View>& x, Offset& o) {
81 int n = x.size();
82 if (n == 1) {
83 GECODE_ME_CHECK(o(x[0]).eq(home,0));
84 } else if (n == 2) {
85 GECODE_ME_CHECK(o(x[0]).eq(home,1));
86 GECODE_ME_CHECK(o(x[1]).eq(home,0));
87 } else {
88 for (int i=0; i<n; i++) {
89 GECODE_ME_CHECK(o(x[i]).gq(home,0));
90 GECODE_ME_CHECK(o(x[i]).le(home,n));
91 GECODE_ME_CHECK(o(x[i]).nq(home,i));
92 }
93 (void) new (home) Val<View,Offset>(home,x,o);
94 }
95 return ES_OK;
96 }
97
98}}}
99

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