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

Method setup

test/ldsb.cpp:1458–1466  ·  view source on GitHub ↗

Setup problem constraints and symmetries

Source from the content-addressed store, hash-verified

1456 static const int u = 1;
1457 /// Setup problem constraints and symmetries
1458 static void setup(Home home, SetVarArray& xs) {
1459 Symmetries syms;
1460 syms << VariableSequenceSymmetry(xs,2);
1461 rel(home, xs[0], SOT_INTER, xs[1], SRT_EQ, IntSet::empty);
1462 rel(home, xs[2], SOT_INTER, xs[3], SRT_EQ, IntSet::empty);
1463 for (int i = 0 ; i < 4 ; i++)
1464 cardinality(home, xs[i], 1, 1);
1465 branch(home, xs, SET_VAR_NONE(), SET_VAL_MIN_INC(), syms);
1466 }
1467 /// Compute list of expected solutions
1468 static std::vector<IntSetArgs> expectedSolutions(void) {
1469 static std::vector<IntSetArgs> expected;

Callers

nothing calls this directly

Calls 6

SET_VAR_NONEFunction · 0.85
SET_VAL_MIN_INCFunction · 0.85
VariableSequenceSymmetryFunction · 0.50
relFunction · 0.50
cardinalityFunction · 0.50
branchFunction · 0.50

Tested by

no test coverage detected