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

Method setup

test/ldsb.cpp:441–448  ·  view source on GitHub ↗

Setup problem constraints and symmetries

Source from the content-addressed store, hash-verified

439 static const int u = 3;
440 /// Setup problem constraints and symmetries
441 static void setup(Home home, IntVarArray& xs) {
442 distinct(home, xs);
443 Matrix<IntVarArray> m(xs, 4, 1);
444 Symmetries s;
445 s << VariableSymmetry(m.slice(0,2, 0,1));
446 s << VariableSymmetry(m.slice(2,4, 0,1));
447 branch(home, xs, INT_VAR_NONE(), INT_VAL_MIN(), s);
448 }
449 /// Compute list of expected solutions
450 static std::vector<IntArgs> expectedSolutions(void) {
451 static std::vector<IntArgs> expected;

Callers

nothing calls this directly

Calls 6

distinctFunction · 0.85
INT_VAR_NONEFunction · 0.85
INT_VAL_MINFunction · 0.85
VariableSymmetryFunction · 0.50
branchFunction · 0.50
sliceMethod · 0.45

Tested by

no test coverage detected