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

Function eliminate_p

gecode/float/linear/nary.hpp:82–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80
81 template<class View>
82 void
83 eliminate_p(ModEventDelta med, ViewArray<View>& x, FloatVal& c) {
84 int n = x.size();
85
86 if (FloatView::me(med) == ME_FLOAT_VAL) {
87 for (int i = n; i--; ) {
88 if (x[i].assigned()) {
89 c -= x[i].val(); x[i] = x[--n];
90 }
91 }
92 x.size(n);
93 }
94 }
95
96 template<class View>
97 void

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
assignedMethod · 0.45
valMethod · 0.45

Tested by

no test coverage detected