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

Method solution

test/set/int.cpp:96–99  ·  view source on GitHub ↗

%Test whether \a x is solution

Source from the content-addressed store, hash-verified

94 : SetTest(t,1,ds_33,true,1) {}
95 /// %Test whether \a x is solution
96 virtual bool solution(const SetAssignment& x) const {
97 CountableSetRanges xr0(x.lub, x[0]);
98 return xr0() && xr0.min()==x.intval();
99 }
100 /// Post constraint on \a x
101 virtual void post(Space& home, SetVarArray& x, IntVarArray& y) {
102 Gecode::min(home, x[0], y[0]);

Callers

nothing calls this directly

Calls 2

intvalMethod · 0.80
minMethod · 0.45

Tested by

no test coverage detected