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

Method post

test/int/mm-count.cpp:78–88  ·  view source on GitHub ↗

Post constraint on \a x

Source from the content-addressed store, hash-verified

76 }
77 /// Post constraint on \a x
78 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
79 switch (irt) {
80 case Gecode::IRT_EQ:
81 Gecode::exactly(home,x,0,2); break;
82 case Gecode::IRT_LQ:
83 Gecode::atmost(home,x,0,2); break;
84 case Gecode::IRT_GQ:
85 Gecode::atleast(home,x,0,2); break;
86 default: GECODE_NEVER;
87 }
88 }
89 };
90
91 /// %Test number of equal integers equal to integer variable

Callers

nothing calls this directly

Calls 3

exactlyFunction · 0.85
atmostFunction · 0.85
atleastFunction · 0.85

Tested by

no test coverage detected