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

Method solution

test/set/int.cpp:180–185  ·  view source on GitHub ↗

%Test whether \a x is solution

Source from the content-addressed store, hash-verified

178 : SetTest(t,1,ds_33,true,1) {}
179 /// %Test whether \a x is solution
180 virtual bool solution(const SetAssignment& x) const {
181 for (CountableSetValues xr(x.lub, x[0]);xr();++xr)
182 if (xr.val()==x.intval())
183 return true;
184 return false;
185 }
186 /// Post constraint on \a x
187 virtual void post(Space& home, SetVarArray& x, IntVarArray& y) {
188 Gecode::rel(home, x[0], SRT_SUP, y[0]);

Callers

nothing calls this directly

Calls 2

intvalMethod · 0.80
valMethod · 0.45

Tested by

no test coverage detected