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

Method setup

test/ldsb.cpp:1229–1238  ·  view source on GitHub ↗

Setup problem constraints and symmetries

Source from the content-addressed store, hash-verified

1227 static const int u = 1;
1228 /// Setup problem constraints and symmetries
1229 static void setup(Home home, IntVarArray& xs) {
1230 TupleSet t(2);
1231 t.add({0,0}).add({1,1}).finalize();
1232 IntVarArgs va;
1233 va << xs[0] << xs[2];
1234 extensional(home, va, t);
1235 Symmetries syms;
1236 syms << VariableSequenceSymmetry(xs, 2);
1237 branch(home, xs, INT_VAR_NONE(), INT_VAL_MIN(), syms);
1238 }
1239 /// Compute list of expected solutions
1240 static std::vector<IntArgs> expectedSolutions(void) {
1241 static std::vector<IntArgs> expected;

Callers

nothing calls this directly

Calls 7

INT_VAR_NONEFunction · 0.85
INT_VAL_MINFunction · 0.85
extensionalFunction · 0.50
VariableSequenceSymmetryFunction · 0.50
branchFunction · 0.50
finalizeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected