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

Method setup

test/ldsb.cpp:830–836  ·  view source on GitHub ↗

Setup problem constraints and symmetries

Source from the content-addressed store, hash-verified

828 static const int u = 6;
829 /// Setup problem constraints and symmetries
830 static void setup(Home home, IntVarArray& xs) {
831 rel(home, xs[0] + xs[1] == 6);
832 Symmetries s;
833 // Values 0,1,2 are symmetric with 6,5,4.
834 s << values_reflect(0,6);
835 branch(home, xs, INT_VAR_NONE(), INT_VAL_MED(), s);
836 }
837 /// Compute list of expected solutions
838 static std::vector<IntArgs> expectedSolutions(void) {
839 static std::vector<IntArgs> expected;

Callers

nothing calls this directly

Calls 5

values_reflectFunction · 0.85
INT_VAR_NONEFunction · 0.85
INT_VAL_MEDFunction · 0.85
relFunction · 0.50
branchFunction · 0.50

Tested by

no test coverage detected