Struct multiplicative_diploid

Struct Documentation

struct fwdpp::multiplicative_diploid

Multiplicative fitness or trait value across sites This function object calculate the genetic value of a diploid according to an multiplicative model with dominance effects per mutation.

The genetic value is calculated via fwdpp::site_dependent_genetic_value.

The genetic value may be treated as a fitness or as a trait value based on arguments passed to the constructor.

Public Types

using result_type = site_dependent_genetic_value::result_type

Public Functions

std::function<double(double)> assign_f(trait&)
std::function<double(double)> assign_f(fitness&)
multiplicative_diploid(trait t)

Construct an object to calculate trait/phenotype values.

Parameters
  • t: fwdpp::trait, where the double repsresents the scaling of “aa” trait values.

template<typename make_return_value_fxn>
multiplicative_diploid(fitness f, make_return_value_fxn &&make_rv)
multiplicative_diploid(fitness gvtype)

Construct an object to calculate fitness values.

Parameters
  • gvtype: fwdpp::fitness, where the double repsresents the scaling of “aa” trait values.

template<typename make_return_value_fxn>
multiplicative_diploid(trait t, make_return_value_fxn &&make_rv)
template<typename iterator_t, typename MutationContainerType>
result_type operator()(iterator_t first1, iterator_t last1, iterator_t first2, iterator_t last2, const MutationContainerType &mutations) const noexcept

Range-based overload.

template<typename HaploidGenomeType, typename MutationContainerType>
double operator()(const HaploidGenomeType &g1, const HaploidGenomeType &g2, const MutationContainerType &mutations) const noexcept

Return

Multiplicative genetic value across sites.

Parameters
  • g1: A haploid_genome

  • g2: A haploid_genome

  • mutations: Container of mutations

template<typename DiploidType, typename GenomeContainerType, typename MutationContainerType>
result_type operator()(const DiploidType &dip, const GenomeContainerType &haploid_genomes, const MutationContainerType &mutations) const noexcept

Overload for diploids. This is what a programmer’s functions will call.

Public Members

const double scaling
const bool gvalue_is_trait
const bool gvalue_is_fitness
const std::function<double(double)> make_return_value