Template Function fwdpp::mutate_recombine_update

Function Documentation

template<typename DiploidType, typename GenomeContainerType, typename MutationContainerType, typename recmodel, typename mutmodel>
std::tuple<std::size_t, std::size_t, std::size_t, std::size_t> fwdpp::mutate_recombine_update(const gsl_rng *r, GenomeContainerType &haploid_genomes, MutationContainerType &mutations, std::tuple<std::size_t, std::size_t, std::size_t, std::size_t> parental_haploid_genomes, const recmodel &rec_pol, const mutmodel &mmodel, const double mu, flagged_haploid_genome_queue &haploid_genome_recycling_bin, flagged_mutation_queue &mutation_recycling_bin, DiploidType &dip, typename GenomeContainerType::value_type::mutation_container &neutral, typename GenomeContainerType::value_type::mutation_container &selected)

“Convenience” function for generating offspring haploid_genomes.

This function calls fwdpp::generate_breakpoints, fwdpp::generate_new_mutations, and fwdpp::mutate_recombine, resulting in two offspring haploid_genomes.

Return

Number of recombination breakpoints and mutations for each haploid_genome.

Note

parental_haploid_genomes should contain parent one/haploid_genome one, parent one/haploid_genome two, parent two/haploid_genome one, and parent two/haploid_genome two, in that order.

Version

Added in fwdpp 0.5.7.

Parameters
  • r: A gsl_rng *

  • haploid_genomes: Vector of haploid_genomes in population

  • mutations: Vector of mutations in population

  • parental_haploid_genomes: Tuple of haploid_genome keys for each parent

  • rec_pol: Policy to generate recombination breakpoints

  • mmodel: Policy to generate new mutations

  • mu: Total mutation rate (per haploid_genome).

  • haploid_genome_recycling_bin: FIFO queue for haploid_genome recycling

  • mutation_recycling_bin: FIFO queue for mutation recycling

  • dip: The offspring

  • neutral: Temporary container for updating neutral mutations

  • selected: Temporary container for updating selected mutations