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

Method solution

test/set/int.cpp:161–165  ·  view source on GitHub ↗

%Test whether \a x is solution

Source from the content-addressed store, hash-verified

159 : SetTest(t,1,ds_33,false,1) {}
160 /// %Test whether \a x is solution
161 virtual bool solution(const SetAssignment& x) const {
162 CountableSetRanges xr0(x.lub, x[0]);
163 IntSet x0(xr0);
164 return !(x0.ranges() > 0 && x0.max()==x.intval());
165 }
166 /// Post constraint on \a x
167 virtual void post(Space& home, SetVarArray& x, IntVarArray& y) {
168 Gecode::notMax(home, x[0], y[0]);

Callers

nothing calls this directly

Calls 3

intvalMethod · 0.80
rangesMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected