Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine branch choice in add_mutation. #1228

Merged
merged 1 commit into from
Nov 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions cpp/functions/add_mutation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ namespace
fwdpp::ts::table_index_t p,
std::vector<fwdpp::ts::table_index_t> d, double a, double b,
double c)
: left{l}, right{r}, node{n}, parent{p},
descendants{std::move(d)}, node_time{a}, parent_time{b}, tree_span{c}
: left{l}, right{r}, node{n}, parent{p}, descendants{std::move(d)},
node_time{a}, parent_time{b}, tree_span{c}
{
}
};
Expand Down Expand Up @@ -199,7 +199,9 @@ namespace
pop.tables
->nodes[tree.parents[n]]
.time,
tree.right - tree.left);
std::min(tree.right, right)
- std::max(left,
tree.left));
}
}
}
Expand Down