13 namespace wtl {
class sfmt19937_64;}
22 using URBG = wtl::sfmt19937_64;
25 Patch(
unsigned int seed);
51 std::map<Individual, size_t>
summarize()
const;
74 std::vector<std::pair<unsigned, unsigned int>>
75 make_destinations(
size_t n,
size_t row,
size_t col,
size_t num_rows,
size_t num_cols)
const;
102 std::unique_ptr<URBG> engine_;
106 extern std::ostream& operator<< (std::ostream& ost,
const Patch& patch);
std::vector< Individual > mate_and_reproduce() const
All females mate with someone according to mating probability.
Definition: patch.cpp:35
sexual, diploid, additive, unlinked, diallelic
Definition: individual.hpp:125
void change_sex_half(size_t n)
Change sex of second half members.
Definition: patch.cpp:28
void viability_selection()
Some individuals die depending on Individual::survival_probability()
Definition: patch.cpp:118
size_t size() const
Definition: patch.hpp:45
std::vector< double > effective_num_competitors() const
Calculate from .
Definition: patch.cpp:105
std::vector< Individual > members_
Individuals.
Definition: patch.hpp:100
~Patch()
destructor in cpp for incomplete type
bool empty() const
Definition: patch.hpp:48
std::vector< std::pair< unsigned, unsigned int > > make_destinations(size_t n, size_t row, size_t col, size_t num_rows, size_t num_cols) const
Change row/col with probability = Individual::MIGRATION_RATE_.
Definition: patch.cpp:91
Definition: individual.hpp:15
Definition: individual.cpp:15
void assign(size_t n, const Individual &founder)
Fill this patch with the same number of females and males.
Definition: patch.cpp:23
void emplace_back(Individual &&ind)
Add an individual to this patch.
Definition: patch.hpp:42
std::map< Individual, size_t > summarize() const
Count genotypes.
Definition: patch.cpp:136
Patch(unsigned int seed)
Construct an empty patch.
Definition: patch.cpp:17