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

Method status

gecode/flatzinc/flatzinc.cpp:170–187  ·  view source on GitHub ↗

Check status of brancher, return true if alternatives left.

Source from the content-addressed store, hash-verified

168 public:
169 /// Check status of brancher, return true if alternatives left.
170 virtual bool status(const Space& _home) const {
171 if (done) return false;
172 const FlatZincSpace& home = static_cast<const FlatZincSpace&>(_home);
173 for (int i=0; i<home.iv_aux.size(); i++)
174 if (!home.iv_aux[i].assigned()) return true;
175 for (int i=0; i<home.bv_aux.size(); i++)
176 if (!home.bv_aux[i].assigned()) return true;
177#ifdef GECODE_HAS_SET_VARS
178 for (int i=0; i<home.sv_aux.size(); i++)
179 if (!home.sv_aux[i].assigned()) return true;
180#endif
181#ifdef GECODE_HAS_FLOAT_VARS
182 for (int i=0; i<home.fv_aux.size(); i++)
183 if (!home.fv_aux[i].assigned()) return true;
184#endif
185 // No non-assigned variables left
186 return false;
187 }
188 /// Return choice
189 virtual Choice* choice(Space& home) {
190 done = true;

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
assignedMethod · 0.45

Tested by

no test coverage detected