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

Method symmetric

gecode/set/ldsb/sym-imp.cpp:55–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53namespace Gecode { namespace Int { namespace LDSB {
54 template <>
55 ArgArray<Literal>
56 VariableSymmetryImp<Set::SetView>
57 ::symmetric(Literal l, const ViewArray<Set::SetView>& x) const {
58 (void) x;
59 if (indices.valid(l._variable) && indices.get(l._variable)) {
60 int n = 0;
61 for (Iter::Values::BitSetOffset<Support::BitSetOffset<Space> > i(indices) ; i() ; ++i)
62 n++;
63 ArgArray<Literal> lits(n);
64 int j = 0;
65 for (Iter::Values::BitSetOffset<Support::BitSetOffset<Space> > i(indices) ; i() ; ++i) {
66 lits[j++] = Literal(i.val(), l._value);
67 }
68 return lits;
69 } else {
70 return ArgArray<Literal>(0);
71 }
72 }
73
74 template <>
75 ArgArray<Literal>

Callers

nothing calls this directly

Calls 10

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

Tested by

no test coverage detected