Skip to content

Commit

Permalink
try to remove last node in a empty partition fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarpomar committed Jul 14, 2020
1 parent 67b0db2 commit 8a21c57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NeighbourJoining.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -5028,7 +5028,7 @@ AbsNeighbourJoining(void)::treePartition(std::vector<std::vector<int64_t>> &chun
updated = true;
}

while (weights[partition.back()] < 3 * (int64_t) partition.size()) {
while (!partition.empty() && weights[partition.back()] < 3 * (int64_t) partition.size()) {
partition.resize(partition.size() - 1);
updated = true;
}
Expand Down

0 comments on commit 8a21c57

Please sign in to comment.