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

Method IndSet

examples/ind-set.cpp:90–101  ·  view source on GitHub ↗

Actual model

Source from the content-addressed store, hash-verified

88public:
89 /// Actual model
90 IndSet(const SizeOptions& opt)
91 : IntMaximizeScript(opt),
92 g(opt.size() == 0 ? g_20_10 : g_40_20),
93 v(*this,g.n_v,0,1), k(*this,0,g.n_v) {
94 const int* e = g.e;
95 for (int i = g.n_e; i--; ) {
96 const int* e1 = e++; const int* e2 = e++;
97 rel(*this, v[*e1], BOT_AND, v[*e2], 0);
98 }
99 linear(*this, v, IRT_EQ, k);
100 branch(*this, v, BOOL_VAR_NONE(), BOOL_VAL_MIN());
101 }
102
103 /// Constructor for cloning \a s
104 IndSet(IndSet& s) : IntMaximizeScript(s), g(s.g) {

Callers

nothing calls this directly

Calls 7

BOOL_VAR_NONEFunction · 0.85
BOOL_VAL_MINFunction · 0.85
relFunction · 0.50
linearFunction · 0.50
branchFunction · 0.50
sizeMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected