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

Method minN

gecode/set/var-imp/integerset.hpp:119–127  ·  view source on GitHub ↗

nth smallest element

Source from the content-addressed store, hash-verified

117
118 // nth smallest element
119 forceinline int
120 BndSet::minN(unsigned int n) const {
121 for (RangeList* c = fst(); c != nullptr; c = c->next()) {
122 if (c->width() > n)
123 return static_cast<int>(c->min() + n);
124 n -= c->width();
125 }
126 return MIN_OF_EMPTY;
127 }
128
129 forceinline unsigned int
130 BndSet::card(void) const {

Callers 1

lubMinNMethod · 0.80

Calls 3

nextMethod · 0.45
widthMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected