MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / remove

Method remove

highs/util/HSet.cpp:66–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66bool 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
87bool HSet::in(const HighsInt entry) const {
88 if (entry < min_entry) return false;

Callers 5

unlinkMethod · 0.45
addToMatrixMethod · 0.45
branchAndPriceFunction · 0.45
TestHSet.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected