Very small note: this conditional looks a bit unnecessary clunky with the nested conditionals (the else at line 100). I suspect this could be rationalised with more unified style.
|
if constexpr (ModelVariant::run_goals) { |
|
if (hiv_step==0) { |
|
state_next.hv.new_infections_dp = 0.0;//init new infections from DP |
|
} |
|
calc_new_infections_agesex_goals(hiv_step); |
|
} |
|
else { |
|
if (p_ha.incidence_model_choice == SS::INCIDMOD_DIRECTINCID_HTS) { |
|
calc_new_infections_agesex(hiv_step); |
|
} else if (p_ha.incidence_model_choice == SS::INCIDMOD_TRANSMRATE_HTS){ |
|
calc_new_infections_incidmod_transmrate(hiv_step); |
|
} else { |
|
throw std::invalid_argument("Incidence model choice not vaild\n"); |
|
} |
|
} |
Very small note: this conditional looks a bit unnecessary clunky with the nested conditionals (the
elseat line 100). I suspect this could be rationalised with more unified style.leapfrog/leapfrog-core/include/models/adult_hiv_model_simulation.hpp
Lines 94 to 108 in 9cbdfe5