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

Method setup

test/ldsb.cpp:766–773  ·  view source on GitHub ↗

Setup problem constraints and symmetries

Source from the content-addressed store, hash-verified

764 static const int u = 6;
765 /// Setup problem constraints and symmetries
766 static void setup(Home home, IntVarArray& xs) {
767 rel(home, xs[0] + xs[1] == 6);
768 // Values 0,1,2 are symmetric with 6,5,4.
769 IntArgs values({0,1,2, 6,5,4});
770 Symmetries s;
771 s << ValueSequenceSymmetry(values, 3);
772 branch(home, xs, INT_VAR_NONE(), INT_VAL_MIN(), s);
773 }
774 /// Compute list of expected solutions
775 static std::vector<IntArgs> expectedSolutions(void) {
776 static std::vector<IntArgs> expected;

Callers

nothing calls this directly

Calls 5

ValueSequenceSymmetryFunction · 0.85
INT_VAR_NONEFunction · 0.85
INT_VAL_MINFunction · 0.85
relFunction · 0.50
branchFunction · 0.50

Tested by

no test coverage detected