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

Method post

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

Post constraint on \a x

Source from the content-addressed store, hash-verified

107 }
108 /// Post constraint on \a x
109 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
110 Gecode::IntVarArgs y(4);
111 for (int i=0; i<4; i++)
112 y[i]=x[i];
113 switch (irt) {
114 case Gecode::IRT_EQ:
115 Gecode::exactly(home,y,0,x[4]); break;
116 case Gecode::IRT_LQ:
117 Gecode::atmost(home,y,0,x[4]); break;
118 case Gecode::IRT_GQ:
119 Gecode::atleast(home,y,0,x[4]); break;
120 default: GECODE_NEVER;
121 }
122 }
123 };
124
125 /// %Test number of equal variables 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