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

Method setNumCol

highs/mip/HighsNodeQueue.cpp:218–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216}
217
218void HighsNodeQueue::setNumCol(HighsInt numCol) {
219 if (this->numCol == numCol) return;
220 this->numCol = numCol;
221 allocatorState = std::unique_ptr<AllocatorState>(new AllocatorState());
222
223 if (numCol == 0) return;
224 colLowerNodesPtr =
225 NodeSetArray((NodeSet*)::operator new(sizeof(NodeSet) * numCol));
226 colUpperNodesPtr =
227 NodeSetArray((NodeSet*)::operator new(sizeof(NodeSet) * numCol));
228
229 NodesetAllocator<std::pair<double, int64_t>> allocator(allocatorState.get());
230 for (HighsInt i = 0; i < numCol; ++i) {
231 new (colLowerNodesPtr.get() + i) NodeSet(allocator);
232 new (colUpperNodesPtr.get() + i) NodeSet(allocator);
233 }
234}
235
236void HighsNodeQueue::checkGlobalBounds(HighsInt col, double lb, double ub,
237 double feastol,

Callers 3

clearMethod · 0.80
runMethod · 0.80
runSetupMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected