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

Method solution

test/int/mm-lin.cpp:158–163  ·  view source on GitHub ↗

%Test whether \a x is solution

Source from the content-addressed store, hash-verified

156 }
157 /// %Test whether \a x is solution
158 virtual bool solution(const Assignment& x) const {
159 if ((x[2] < 0) || (x[2] > 1))
160 return false;
161 int reg[3] = {x[0],x[1],x[2]};
162 return eval(lis, reg) == x[3];
163 }
164 /// Post constraint on \a x
165 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
166 using namespace Gecode;

Callers

nothing calls this directly

Calls 1

evalFunction · 0.70

Tested by

no test coverage detected