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

Method next

test/set.cpp:75–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73 }
74
75 void
76 SetAssignment::next(Gecode::Support::RandomGenerator& rand) {
77 int i = n-1;
78 while (true) {
79 ++dsv[i];
80 if (dsv[i]())
81 return;
82 dsv[i].init(lub);
83 --i;
84 if (i<0) {
85 if (withInt==0) {
86 done = true;
87 return;
88 }
89 ir.next(rand);
90 if (ir.has_more()) {
91 i = n-1;
92 for (int j=n; j--; )
93 dsv[j].init(lub);
94 } else {
95 done = true;
96 return;
97 }
98 }
99 }
100 }
101
102}}
103

Callers 1

runMethod · 0.45

Calls 2

initMethod · 0.45
has_moreMethod · 0.45

Tested by

no test coverage detected