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

Method status

examples/knights.cpp:93–102  ·  view source on GitHub ↗

Check status of brancher, return true if alternatives left

Source from the content-addressed store, hash-verified

91public:
92 /// Check status of brancher, return true if alternatives left
93 virtual bool status(const Space&) const {
94 // A path to follow can be at most x.size() long
95 for (int n=x.size(); n--; ) {
96 if (!x[start].assigned())
97 return true;
98 // Follow path of assigned variables
99 start = x[start].val();
100 }
101 return false;
102 }
103 /// Return choice
104 virtual Gecode::Choice* choice(Space&) {
105 Int::ViewValues<Int::IntView> iv(x[start]);

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
assignedMethod · 0.45
valMethod · 0.45

Tested by

no test coverage detected