Template Struct haploid_genome_base¶
Defined in File forward_types.hpp
Struct Documentation¶
-
template<typename
TAG= tags::standard_haploid_genome>
structfwdpp::haploid_genome_base¶ Base class for genomes.
A haploid_genome contains one container of keys to neutral mutations, and another to selected mutations. It also keeps track of its count (number of occurrences).
The template parameter types are: tag_type = A type that can be used as a “dispatch tag”. Currently, these are not used elsewhere in the library, but they may be in the future, or this may disappear in future library releases.
- Note
The typical use of this class is simply to define your mutation type (see md_md_policies) and then use a typedef to define your haploid_genome type in the simulations:
See md_md_policies for examples of this.using haploid_genome_t = fwdpp::haploid_genome_base<mutation_type>
Public Types
-
using
index_t= std::uint32_t¶
-
using
constructor_tuple= std::tuple<uint_t, mutation_container, mutation_container>¶ Tuple type usable for construction.
Public Functions
-
haploid_genome_base(const uint_t &icount) noexcept¶ Constructor.
- Parameters
icount: The number of occurrences of this haploid_genome in the population
-
template<typename
T>haploid_genome_base(const uint_t &icount, T &&n, T &&s) noexcept¶ “Perfect-forwarding” constructor
- Parameters
icount: The number of occurrences of this haploid_genome in the populationn: A container of mutations not affecting trait value/fitnesss: A container of mutations affecting trait value/fitness
-
haploid_genome_base(constructor_tuple t)¶ Construct from n, mutations, smutations tuple.
-
~haploid_genome_base() noexcept¶ Destructor is virtual, so you may inherit from this type.
-
haploid_genome_base(haploid_genome_base const&) = default¶ Copy constructor.
-
haploid_genome_base(haploid_genome_base&&) = default¶ Move constructor.
-
haploid_genome_base &
operator=(haploid_genome_base const&) = default¶ Assignment operator.
-
haploid_genome_base &
operator=(haploid_genome_base&&) = default¶ Move assignment operator.
-
bool
operator==(const haploid_genome_base<TAG> &rhs) const¶ Equality operation.
Public Members
-
mutation_container
mutations¶ Container of mutations not affecting trait value/fitness (“neutral
mutations”)
-
mutation_container
smutations¶ Container of mutations affecting trait value/fitness (“selected” mutations”)