| 64 | } |
| 65 | |
| 66 | bool HSet::remove(const HighsInt entry) { |
| 67 | if (!setup_) { |
| 68 | setup(1, 0); |
| 69 | if (debug_) debug(); |
| 70 | return false; |
| 71 | } |
| 72 | if (entry < min_entry) return false; |
| 73 | if (entry > max_entry_) return false; |
| 74 | HighsInt pointer = pointer_[entry]; |
| 75 | if (pointer == no_pointer) return false; |
| 76 | pointer_[entry] = no_pointer; |
| 77 | if (pointer < count_ - 1) { |
| 78 | HighsInt last_entry = entry_[count_ - 1]; |
| 79 | entry_[pointer] = last_entry; |
| 80 | pointer_[last_entry] = pointer; |
| 81 | } |
| 82 | count_--; |
| 83 | if (debug_) debug(); |
| 84 | return true; |
| 85 | } |
| 86 | |
| 87 | bool HSet::in(const HighsInt entry) const { |
| 88 | if (entry < min_entry) return false; |
no outgoing calls
no test coverage detected