Skip to content

Commit

Permalink
Swap in ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
emilydolson committed Mar 2, 2024
1 parent 4b422e5 commit dd09c54
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions include/emp/Evolve/Systematics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1213,10 +1213,7 @@ namespace emp {
// std::ranges::ref_view(outside_taxa)};
// for (emp::Ptr<taxon_t> tax : all | std::views::join) {
for (emp::Ptr<taxon_t> tax : active_taxa) {
double weight = 1;
if (normalize) {
weight = std::max(0, static_cast<int>(tax->GetNumOff()) - 1);
}
const double weight = normalize ? std::max(0, static_cast<int>(tax->GetNumOff()) - 1) : 1.0;
total += tax->GetOriginationTime() * weight;
count += weight;
}
Expand Down

0 comments on commit dd09c54

Please sign in to comment.