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

Method post

gecode/int/count/view-eq.hpp:43–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42 template<class VX, class VY, class VZ, bool shr, bool dom>
43 ExecStatus
44 EqView<VX,VY,VZ,shr,dom>::post(Home home,
45 ViewArray<VX>& x, VY y, VZ z, int c) {
46 GECODE_ME_CHECK(z.gq(home,-c));
47 GECODE_ME_CHECK(z.lq(home,x.size()-c));
48 if (isval(y) && z.assigned())
49 return EqInt<VX,VY>::post(home,x,y,z.val()+c);
50 if (sharing(x,y,z))
51 (void) new (home) EqView<VX,VY,VZ,true,dom>(home,x,y,z,c);
52 else
53 (void) new (home) EqView<VX,VY,VZ,false,dom>(home,x,y,z,c);
54 return ES_OK;
55 }
56
57 template<class VX, class VY, class VZ, bool shr, bool dom>
58 forceinline

Callers

nothing calls this directly

Calls 7

isvalFunction · 0.85
postFunction · 0.50
gqMethod · 0.45
lqMethod · 0.45
sizeMethod · 0.45
assignedMethod · 0.45
valMethod · 0.45

Tested by

no test coverage detected