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

Function linear

gecode/int/linear-bool.cpp:40–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 using namespace Int;
39
40 void
41 linear(Home home, const BoolVarArgs& x, IntRelType irt, int c,
42 IntPropLevel ipl) {
43 GECODE_POST;
44
45 int n=x.size();
46 Region re;
47 Linear::Term<BoolView>* t = re.alloc<Linear::Term<BoolView>>(n);
48 for (int i=0; i<n; i++) {
49 t[i].a=1; t[i].x=x[i];
50 }
51
52 Linear::post(home,t,n,irt,c,ipl);
53 }
54
55 void
56 linear(Home home, const BoolVarArgs& x, IntRelType irt, IntVar y,

Callers

nothing calls this directly

Calls 6

postFunction · 0.50
estimateFunction · 0.50
sizeMethod · 0.45
gqMethod · 0.45
lqMethod · 0.45
failedMethod · 0.45

Tested by

no test coverage detected