Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions cpp/src/dual_simplex/phase2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -752,10 +752,9 @@ void clean_up_infeasibilities(std::vector<f_t>& squared_infeasibilities,
const f_t squared_infeas = squared_infeasibilities[j];
if (squared_infeas == 0.0) {
// Set to the last element
const i_t sz = infeasibility_indices.size();
infeasibility_indices[k] = infeasibility_indices[sz - 1];
const i_t new_j = infeasibility_indices.back();
infeasibility_indices[k] = new_j;
infeasibility_indices.pop_back();
i_t new_j = infeasibility_indices[k];
if (squared_infeasibilities[new_j] == 0.0) { k--; }
}
}
Expand Down