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

Function eliminate_n

gecode/float/linear/nary.hpp:97–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95
96 template<class View>
97 void
98 eliminate_n(ModEventDelta med, ViewArray<View>& y, FloatVal& c) {
99 int n = y.size();
100 if (FloatView::me(med) == ME_FLOAT_VAL) {
101 for (int i = n; i--; ) {
102 if (y[i].assigned()) {
103 c += y[i].val(); y[i] = y[--n];
104 }
105 }
106 y.size(n);
107 }
108 }
109
110 forceinline bool
111 infty(const FloatNum& n) {

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
assignedMethod · 0.45
valMethod · 0.45

Tested by

no test coverage detected