Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 8e92504e authored by David Parsons's avatar David Parsons
Browse files

Re-enable modifying phenotypic target PRNGs

parent e34a11eb
No related branches found
No related tags found
No related merge requests found
...@@ -413,6 +413,13 @@ void World::set_stoch_prng(std::shared_ptr<JumpingMT> prng) ...@@ -413,6 +413,13 @@ void World::set_stoch_prng(std::shared_ptr<JumpingMT> prng)
} }
} }
void World::set_phen_target_prngs(std::shared_ptr<JumpingMT> var_prng,
std::shared_ptr<JumpingMT> noise_prng) {
assert(phenotypic_target_shared_);
phenotypic_target_handler_->set_var_prng(var_prng);
phenotypic_target_handler_->set_noise_prng(noise_prng);
}
Individual* World::get_indiv_by_id(int32_t id) const { Individual* World::get_indiv_by_id(int32_t id) const {
Individual* indiv = grid_1d_[id]->get_individual(); Individual* indiv = grid_1d_[id]->get_individual();
// When the population isn't mixed at all, the individual with id n is in // When the population isn't mixed at all, the individual with id n is in
...@@ -427,5 +434,4 @@ Individual* World::get_indiv_by_id(int32_t id) const { ...@@ -427,5 +434,4 @@ Individual* World::get_indiv_by_id(int32_t id) const {
} }
return nullptr; return nullptr;
} }
} // namespace aevol } // namespace aevol
...@@ -139,6 +139,9 @@ class World ...@@ -139,6 +139,9 @@ class World
void save(gzFile backup_file) const; void save(gzFile backup_file) const;
void load(gzFile backup_file, ExpManager * exp_man); void load(gzFile backup_file, ExpManager * exp_man);
void set_phen_target_prngs(std::shared_ptr<JumpingMT> var_prng,
std::shared_ptr<JumpingMT> noise_prng);
protected : protected :
// ================================================================= // =================================================================
// Protected Methods // Protected Methods
...@@ -151,7 +154,7 @@ class World ...@@ -151,7 +154,7 @@ class World
// ================================================================= // =================================================================
// Protected Attributes // Protected Attributes
// ================================================================= // =================================================================
std::shared_ptr<JumpingMT> _prng = NULL; std::shared_ptr<JumpingMT> _prng = nullptr;
std::shared_ptr<JumpingMT> _mut_prng = nullptr; std::shared_ptr<JumpingMT> _mut_prng = nullptr;
std::shared_ptr<JumpingMT> _stoch_prng = nullptr; std::shared_ptr<JumpingMT> _stoch_prng = nullptr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment