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

Method symmetric

gecode/int/ldsb/sym-imp.cpp:40–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 /// Compute symmetric literals
39 template <>
40 ArgArray<Literal>
41 VariableSymmetryImp<IntView>
42 ::symmetric(Literal l, const ViewArray<IntView>& x) const {
43 (void) x;
44 if (indices.valid(l._variable) && indices.get(l._variable)) {
45 int n = 0;
46 for (Iter::Values::BitSetOffset<Support::BitSetOffset<Space> > i(indices) ; i() ; ++i)
47 n++;
48 ArgArray<Literal> lits(n);
49 int j = 0;
50 for (Iter::Values::BitSetOffset<Support::BitSetOffset<Space> > i(indices) ; i() ; ++i)
51 lits[j++] = Literal(i.val(), l._value);
52 return lits;
53 } else {
54 return ArgArray<Literal>(0);
55 }
56 }
57 /// Compute symmetric literals
58 template <>
59 ArgArray<Literal>

Callers 1

choiceMethod · 0.45

Calls 8

LiteralClass · 0.85
findVarFunction · 0.85
dynamicStackToArgArrayFunction · 0.85
iFunction · 0.50
validMethod · 0.45
getMethod · 0.45
valMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected