Template Function fwdpp::sugar::get_mut_index¶
Defined in File add_mutation.hpp
Function Documentation¶
-
template<typename
MutationContainerType, typenamemcounts_t>
std::size_tfwdpp::sugar::get_mut_index(MutationContainerType &mutations, mcounts_t &mcounts, typename MutationContainerType::value_type &new_mutation)¶ Helper function for implementing fwdpp::add_mutation.
If new_mutation already exists in mutations, its location is returned.
Otherwise, this function puts the new mutation into the mutations container and updates other objects as needed.
- Return
A key telling where new_mutation exists within mutations.
- Note
This function requires that operator== be defined for the mutation type.
- Note
In the event that new_mutation is added to mutations, the count for that mutations will be zero.