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

Method Latin

test/ldsb.cpp:1142–1154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1140 public:
1141 IntVarArray xs;
1142 Latin(int n = 4) : xs(*this, n*n, 1, n)
1143 {
1144 Matrix<IntVarArray> m(xs, n, n);
1145 for (int i = 0 ; i < n ; i++) {
1146 distinct(*this, m.col(i));
1147 distinct(*this, m.row(i));
1148 }
1149 Symmetries s;
1150 s << rows_interchange(m);
1151 s << columns_interchange(m);
1152 s << ValueSymmetry(IntSet(1,n));
1153 branch(*this, xs, INT_VAR_NONE(), INT_VAL_MIN(), s);
1154 }
1155 // Search support.
1156 Latin(Latin& s) : Space(s)
1157 { xs.update(*this, s.xs); }

Callers

nothing calls this directly

Calls 11

distinctFunction · 0.85
rows_interchangeFunction · 0.85
columns_interchangeFunction · 0.85
ValueSymmetryFunction · 0.85
IntSetClass · 0.85
INT_VAR_NONEFunction · 0.85
INT_VAL_MINFunction · 0.85
branchFunction · 0.50
colMethod · 0.45
rowMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected