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

Method slave

examples/photo.cpp:132–141  ·  view source on GitHub ↗

Slave function for restarts

Source from the content-addressed store, hash-verified

130 }
131 /// Slave function for restarts
132 bool slave(const MetaInfo& mi) {
133 if ((mi.type() == MetaInfo::RESTART) &&
134 (mi.restart() > 0) && (p > 0.0)) {
135 const Photo& l = static_cast<const Photo&>(*mi.last());
136 relax(*this, pos, l.pos, rnd, p);
137 return false;
138 } else {
139 return true;
140 }
141 }
142 /// Constructor for cloning \a s
143 Photo(Photo& s) :
144 IntMinimizeScript(s), spec(s.spec), rnd(s.rnd), p(s.p) {

Callers

nothing calls this directly

Calls 4

relaxFunction · 0.50
typeMethod · 0.45
restartMethod · 0.45
lastMethod · 0.45

Tested by

no test coverage detected