|
| Individual () |
| Default constructor for original individuals.
|
|
| Individual (const std::vector< Loci > &egg, const std::vector< Loci > &sperm, const bool is_male=false) |
| Constructor for sexual reproduction.
|
|
| Individual (const std::vector< unsigned long > &) |
| Homozygous initialization by bit values.
|
|
double | effective_carrying_capacity_quad_unnormalized () const |
| \(K_e(I)\) with quadratic \(\Xi\) before normalization (v3u) More...
|
|
double | effective_carrying_capacity_exp_unnormalized () const |
| \(K_e(I)\) with exponential \(\Xi\)
|
|
double | effective_carrying_capacity_old_exp_unnormalized () const |
| \(K_e(I)\) with old resource distribution and exponential \(\Xi\) before normalization
|
|
double | effective_carrying_capacity_cache () const |
| Find \(K_e(I)\) in KE_CACHE_ or calculate.
|
|
double | preference_overlap (const Individual &other) const |
| Exponent of \(C_y(I, J)\): competition on habitat preference. More...
|
|
double | morphology_overlap (const Individual &other) const |
| Exponent of \(C_x(I, J)\): competition on morphology. More...
|
|
double | resource_overlap (const Individual &other) const |
| \(C(I, J) = C_x(I,J) C_y(I,J)\) for competition
|
|
double | survival_probability (const double effective_num_competitors) const |
| Probability of survival \(w(I)\). More...
|
|
double | mating_probability (const Individual &male) const |
| \(P(I,I') = \psi(I,I') C_y(I,I')\) More...
|
|
double | mating_probability_debarre (const Individual &male) const |
| \(P(I,I') = \psi(I,I') C_y(I,I')\) with Debarre 2012 More...
|
|
double | mating_probability_TPG2013 (const Individual &male) const |
| \(P(I,I') = \psi(I,I') C_y(I,I')\) with Thibert-Plante and Gavrilets 2013 More...
|
|
std::vector< Loci > | gametogenesis (URBG &) const |
| Gametogenesis with free recombination and mutation. More...
|
|
bool | is_male () const |
| Get sex_.
|
|
void | change_sex () |
| Change sex_.
|
|
bool | operator< (const Individual &other) const |
| Operator required to be std::map key.
|
|
std::string | str_detail () const |
| detailed str() for testing/debugging
|
|
|
double | habitat_preference_exp (const double height, const double diameter) const |
| Exponent of \(\Xi(I, u, v)\) in anolis_v2. More...
|
|
double | habitat_preference_quadratic (const double height, const double diameter) const |
| \(\Xi(I, u, v)\) quadratic approximation in anolis_v3 More...
|
|
double | calc_DI_analytical () const |
| \(D_I\) analytical computation by Mathematica (fast but limited) More...
|
|
double | calc_DI_numerical () const |
| \(D_I\) numerical computation (slow) More...
|
|
double | calc_Dxi_analytical () const |
| Calculate quadratic \(\Xi(I, u, v)\) normalizer with analytical solution. More...
|
|
double | calc_Dxi_numerical () const |
| Numerical integration of quadratic \(\xi(I, u, v)\). More...
|
|
double | fitness (const double height, const double diameter) const |
| Exponent of \(W(x_0, x_1 \mid u, v)\): measure adaptation to habitat. More...
|
|
std::vector< double > | calc_phenotype () const |
| calculates phenotypic values from genotype More...
|
|
std::vector< double > | intermediate_phenotypes () const |
| aggregation of intermediate phenotype values
|
|
|
static constexpr size_t | NUM_LOCI_ = 8 |
| The number of loci per trait.
|
|
static constexpr unsigned long | FULL_BITS = (1u << NUM_LOCI_) - 1u |
| Genotype that produce trait value = 1.0, i.e., 11111111
|
|
static constexpr unsigned long | HALF_BITS = (1u << (NUM_LOCI_ / 2u)) - 1u |
| Genotype that produce trait value = 0.5, i.e., 00001111
|
|
static constexpr double | INV_NUM_LOCI_ = 0.5 / NUM_LOCI_ |
| Compile-time constant value used in init_phenotype()
|
|
static constexpr size_t | NUM_STEPS_ = 32 |
| Precision of numerical integration.
|
|
static std::map< std::vector< double >, double > | KE_CACHE_ |
| Store \(K_e(I)\) with ecological traits as keys.
|
|
static const std::vector< std::string > | INTERMEDIATE_KEYS_ |
| labels for intermediate phenotypes More...
|
|
static param_type | PARAM_ |
| Parameters shared among instances.
|
|
|
std::ostream & | operator<< (std::ostream &ost, const Individual &ind) |
| put CSV on ostream
|
|
double | pdf_beta (const double height, const double diameter) |
| Beta distribution function for resource abundance.
|
|
double | pdf_normal (const double height, const double diameter) |
| Distribution of tree height given diameter.
|
|
double | pdf_exp (const double height, const double diameter) |
| Distribution of twig diameter given height.
|
|
template<class Func > |
double | integrate_triangle (Func &&func) |
| Integral over \(0 \leq u \leq 1\) and \(0 \leq v \leq 1 - u\).
|
|
template<class Func > |
double | integrate_square (Func &&func) |
| Integral over \(0 \leq u,v \leq 1\).
|
|
sexual, diploid, additive, unlinked, diallelic
Individuals are sexual and diploid. Each individual has a number of additive quantitative characters:
- two “morphological” characters \( x_0 \) (toepad size) and \( x_1 \) (limb length) that control viability;
- two “habitat preference” characters: the most preferred height \( y_0 \) and the most preferred diameter \( y_1 \)
- three “mating compatibility” characters \( m \), \( f \), and \( c \).
The male display trait \( m \) is expressed in males only, whereas female mating preference \( f \) and tolerance \( c \) are expressed in females only. Other traits are expressed in both sexes. All traits are scaled to be between 0 and 1, and are controlled by different unlinked diallelic loci with equal effects. Mutations occur at equal rates across all loci; the probabilities of forward and backward mutations are equal.