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

Method backtrack

gecode/gist/nodevisitor.hpp:84–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83 template<class Cursor>
84 forceinline bool
85 PreorderNodeVisitor<Cursor>::backtrack(void) {
86 while (! c.mayMoveSidewards() && c.mayMoveUpwards()) {
87 c.moveUpwards();
88 }
89 if (! c.mayMoveUpwards()) {
90 return false;
91 } else {
92 c.moveSidewards();
93 }
94 return true;
95 }
96
97 template<class Cursor>
98 PreorderNodeVisitor<Cursor>::PreorderNodeVisitor(const Cursor& c0)

Callers

nothing calls this directly

Calls 4

mayMoveSidewardsMethod · 0.80
mayMoveUpwardsMethod · 0.80
moveUpwardsMethod · 0.45
moveSidewardsMethod · 0.45

Tested by

no test coverage detected