Template Function fwdpp::compact_mutations

Function Documentation

template<typename T>
std::vector<fwdpp::uint_t> fwdpp::compact_mutations(T &pop)

Sort mutation positions in population.

Reorders the population mutation container so that it is sorted by increasing mutation position. The reordering requires assigning new key values into all haploid_genomes, which is also done. The mutation counts and mut_lookup data structures also get updated.

Running this periodically is a performance increase due to improved cache performance.

Return

A vector containing the mapping of old to new mutation index

Parameters
  • pop: A population.