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

Function createCutoff

gecode/driver/script.hpp:163–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161 /// Create cutoff object from options
162 template<class Options>
163 inline Search::Cutoff*
164 createCutoff(const Options& o) {
165 switch (o.restart()) {
166 case RM_NONE:
167 return nullptr;
168 case RM_CONSTANT:
169 return Search::Cutoff::constant(o.restart_scale());
170 case RM_LINEAR:
171 return Search::Cutoff::linear(o.restart_scale());
172 case RM_LUBY:
173 return Search::Cutoff::luby(o.restart_scale());
174 case RM_GEOMETRIC:
175 return Search::Cutoff::geometric(o.restart_scale(),o.restart_base());
176 default: GECODE_NEVER;
177 }
178 return nullptr;
179 }
180
181
182#ifdef GECODE_HAS_GIST

Callers 2

runMetaMethod · 0.85
runMetaMethod · 0.85

Calls 4

linearFunction · 0.50
restartMethod · 0.45
restart_scaleMethod · 0.45
restart_baseMethod · 0.45

Tested by

no test coverage detected