![]() |
Quetzal-CoaTL
The Coalescence Template Library
|
#include <quetzal/demography/History.hpp>
Unspecialized class (CRTP design pattern)
Space | Demes identifiers. |
demographic_policy | policy used for simulating populations dynamics |
Public Types | |
using | coord_type = Space |
using | time_type = unsigned int |
using | memory_policy = MemoryPolicy |
using | demographic_policy = DispersalPolicy |
using | value_type = typename demographic_policy::value_type |
using | flow_type = typename memory_policy::template flow_type< coord_type, time_type, value_type > |
using | pop_sizes_type = typename memory_policy::template pop_sizes_type< coord_type, time_type, value_type > |
using | discrete_distribution_type = quetzal::utils::random::DiscreteDistribution< coord_type > |
Public Member Functions | |
auto | distribution_area (time_type t) const |
Retrieve demes where N > 0 at time t. | |
auto & | pop_size (coord_type const &x, time_type const &t) |
Population size at deme x at time t. | |
auto | get_functor_N () const noexcept |
Read-only functor. | |
auto | get_pop_size (coord_type const &x, time_type const &t) |
Read-only. | |
void | set_pop_size (coord_type const &x, time_type const &t, value_type N) |
Used in derived class History to increment migrants. | |
unsigned int const & | nb_generations () const |
Last time recorded in the foward-in-time database history. | |
coord_type | backward_kernel (coord_type const &x, time_type t, Generator &gen) const |
Samples a coordinate from the backward-in-time transition matrix. | |
Protected Attributes | |
std::unique_ptr< flow_type > | m_flows |
|
inlineinherited |
Samples a coordinate from the backward-in-time transition matrix.
The transition matrix is computed from the demographic flows database. The returned coordinate object will basically answer the question: when an individual is found in \(x\) at time \(t\), where could it have been at time \(t-1\) ?
|
inlineinherited |
Population size at deme x at time t.