Template Function fwdpp::recycle_mutation_helper

Function Documentation

template<typename MutationContainerType, class ...Args>
std::size_t fwdpp::recycle_mutation_helper(flagged_mutation_queue &mutation_recycling_bin, MutationContainerType &mutations, Args&&... args)

Helper function for mutation policies.

This function minimizes code duplication when writing mutation models. It abstracts the operations needed to recycle an extinct mutation.

Return

the location of the new variant in mutations

Parameters
  • mutation_recycling_bin: A FIFO queue of iterators pointing to extinct mutations.

  • mutations: A list of mutation objects

  • args: Parameter pack to be passed to constructor of an MutationContainerType::value_typeHelper function for implementing mutation generation functions.

  • mutation_recycling_bin: A flagged_mutation_queue

  • mutations: Container of mutations

  • args: Constructor arguments to create a new mutation