nth smallest element
| 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 { |