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

Function extend

gecode/float/linear/post.cpp:84–95  ·  view source on GitHub ↗

Extend terms by adding view for result

Source from the content-addressed store, hash-verified

82
83 /// Extend terms by adding view for result
84 FloatView
85 extend(Home home, Region& r, Term*& t, int& n) {
86 FloatNum min, max;
87 estimate(t,n,0.0,min,max);
88 FloatVar x(home,min,max);
89 Term* et = r.alloc<Term>(n+1);
90 for (int i=n; i--; )
91 et[i] = t[i];
92 et[n].a=-1.0; et[n].x=x;
93 t=et; n++;
94 return x;
95 }
96
97
98 /**

Callers 1

postFunction · 0.85

Calls 1

estimateFunction · 0.70

Tested by

no test coverage detected