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

Method rndvar

test/int.cpp:168–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166 }
167
168 int
169 TestSpace::rndvar(Gecode::Support::RandomGenerator& rand) {
170 assert(!assigned());
171 // Select variable to be pruned
172 int i = static_cast<int>(rand(static_cast<unsigned int>(x.size())));
173 while (x[i].assigned()) {
174 i = (i+1) % x.size();
175 }
176 return i;
177 }
178
179 void
180 TestSpace::rndrel(const Assignment& a, int i, Gecode::IntRelType& irt, int& v,

Callers

nothing calls this directly

Calls 3

assignedFunction · 0.85
sizeMethod · 0.45
assignedMethod · 0.45

Tested by

no test coverage detected