Template Function fwdpp::add_mutations¶
Defined in File add_mutation.hpp
Function Documentation¶
-
template<typename
poptype>
voidfwdpp::add_mutations(poptype &p, const std::vector<std::size_t> &indlist, const std::vector<short> &clist, const std::vector<std::size_t> &mutation_indexes)¶ Add a set of mutations into a set of individuals in a population.
Some notes:
- Return
Nothing (void)
- Parameters
p: A diploid population object.indlist: A list of indexes of diploids into which to add the new mutations.clist: A list of haploid_genomes. See below.mutation_indexes: The set of mutations to add. See below.
clist.size() must equal indlist.size()
Values in clist must be 0, 1, or 2. These values mean to add the mutation to the first, second, or both haploid_genomes, resepectively, of each diploid in indlist.
See the unit test file unit/test_sugar_add_mutation.cc for example of use.
- Note
mutation_indexes refers to the locations of mutations found in p.mutations.
- Note
For each element, i, in mutation_indexes, p.mcounts[i] should be zero before entering this function.
- Note
p.mut_lookup is NOT updated by this function.