| 360 | } |
| 361 | |
| 362 | double HighsNodeQueue::emplaceNode(std::vector<HighsDomainChange>&& domchgs, |
| 363 | std::vector<HighsInt>&& branchPositions, |
| 364 | double lower_bound, double estimate, |
| 365 | HighsInt depth) { |
| 366 | int64_t pos; |
| 367 | |
| 368 | assert(estimate != kHighsInf); |
| 369 | |
| 370 | if (freeslots.empty()) { |
| 371 | pos = nodes.size(); |
| 372 | nodes.emplace_back(std::move(domchgs), std::move(branchPositions), |
| 373 | lower_bound, estimate, depth); |
| 374 | } else { |
| 375 | pos = freeslots.top(); |
| 376 | freeslots.pop(); |
| 377 | nodes[pos] = OpenNode(std::move(domchgs), std::move(branchPositions), |
| 378 | lower_bound, estimate, depth); |
| 379 | } |
| 380 | |
| 381 | assert(nodes[pos].lower_bound == lower_bound); |
| 382 | assert(nodes[pos].estimate == estimate); |
| 383 | assert(nodes[pos].depth == depth); |
| 384 | |
| 385 | return link(pos); |
| 386 | } |
| 387 | |
| 388 | HighsNodeQueue::OpenNode&& HighsNodeQueue::popBestNode() { |
| 389 | int64_t bestNode = hybridEstimMin; |
no test coverage detected