Template Function fwdpp::mutate_recombine

Function Documentation

template<typename GenomeContainerType, typename MutationContainerType, typename queue_type, typename new_mutations_type, typename breakpoints_type>
uint_t fwdpp::mutate_recombine(const new_mutations_type &new_mutations, const breakpoints_type &breakpoints, const std::size_t g1, const std::size_t g2, GenomeContainerType &haploid_genomes, MutationContainerType &mutations, queue_type &haploid_genome_recycling_bin, typename GenomeContainerType::value_type::mutation_container &neutral, typename GenomeContainerType::value_type::mutation_container &selected)

Update apply new mutations and recombination events to an offspring’s haploid_genome.

TODO: unit test this note. I simply cannot believe it! :)

Todo:

Need a unit test on what happens if mutation_keys is not a sorted range

Return

The index of the new offspring haploid_genome in haploid_genomes.

Note

For efficiency, it is helpful if new_mutations is sorted by mutation position. fwdpp::generate_new_mutations exists to help in that regard. Many of the evolve functions used in this library and other packages by the author will use fwdpp::generate_breakpoints to generate breakpoints. That is not, however, required.

Parameters
  • new_mutations: A range referring to new mutation keys. Must be traversable via non-member begin/end functions using argument-dependent lookup (ADL).

  • breakpoints: A range of recombination breakpoints traversable via non-member begin/end functions.

  • g1: Parental haploid_genome 1

  • g2: Parental haploid_genome 2

  • haploid_genomes: The vector of haploid_genomes in the population

  • mutations: The vector of mutations in the population

  • haploid_genome_recycling_bin: FIFO queue for haploid_genome recycling

  • neutral: Temporary container for updating neutral mutations

  • selected: Temporary container for updatng selected positions

Version

This function was added in fwdpp 0.5.7.