Template Function fwdpp::change_neutral¶
Defined in File change_neutral.hpp
Function Documentation¶
-
template<typename
poptype>
voidfwdpp::change_neutral(poptype &p, const std::size_t mindex)¶ Change the value of mutation_base::neutral.
This function negates
mutation_base::neutral at position mindex and updates the storage of this mutation in all haploid_genomes.- Parameters
p: A populationmindex: The key of the mutation you wish to change.
- Note
This function does not change any other member data at p.mutations[mindex]!! Thus, if you change a mutation from “neutral” to “selected”, you must manually change the relevant member data to reflect its new effect size. For the simplest use case of making a mutation no longer subject to selection, no additional changes are needed. Rather, it is sufficient that mutation_base::neutral == true.
- Exceptions
std::out_of_range: if mindex is out of range.