Mentions légales du service

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

use static exp_manager in PhenotypicTargetHandler_R

parent adfc7787
No related branches found
No related tags found
No related merge requests found
......@@ -159,8 +159,8 @@ SIMD_PhenotypicTargetHandler_R::SIMD_PhenotypicTargetHandler_R(
check_simd_ = check_simd;
}
SIMD_PhenotypicTargetHandler_R::SIMD_PhenotypicTargetHandler_R(
SIMD_PhenotypicTargetHandler_R* handler, FuzzyFactory_7* fuzzy_factory_, ExpManager* exp_m) {
SIMD_PhenotypicTargetHandler_R::SIMD_PhenotypicTargetHandler_R(SIMD_PhenotypicTargetHandler_R* handler,
FuzzyFactory_7* fuzzy_factory_) {
var_method_ = handler->var_method_;
......@@ -197,7 +197,7 @@ SIMD_PhenotypicTargetHandler_R::SIMD_PhenotypicTargetHandler_R(
signals_models_.resize(handler->signals_models_.size());
int32_t i = 0;
for (auto signal_protein : handler->signals_models_) {
Protein_7* prot = new Protein_7(signal_protein, exp_m->exp_s()->get_with_heredity());
Protein_7* prot = new Protein_7(signal_protein, exp_manager->exp_s()->get_with_heredity());
prot->protein_id_ = -i;
signals_models_[i] = prot;
i++;
......
......@@ -44,7 +44,7 @@ class SIMD_PhenotypicTargetHandler_R {
SIMD_PhenotypicTargetHandler_R(std::shared_ptr<PhenotypicTargetHandler_R> handler,
const ExpSetup* exp_s, FuzzyFactory_7* fuzzy_factory, bool check_simd = false);
SIMD_PhenotypicTargetHandler_R(SIMD_PhenotypicTargetHandler_R* handler, FuzzyFactory_7* fuzzy_factory_, ExpManager* exp_m);
SIMD_PhenotypicTargetHandler_R(SIMD_PhenotypicTargetHandler_R* handler, FuzzyFactory_7* fuzzy_factory_);
~SIMD_PhenotypicTargetHandler_R();
......
......@@ -245,7 +245,7 @@ int main(int argc, char* argv[]) {
SIMD_PhenotypicTargetHandler_R** pth_array_0;
pth_array_0 = new SIMD_PhenotypicTargetHandler_R*[max_it_env];
for (int i = 0; i < max_it_env; i++) {
pth_array_0[i] = new SIMD_PhenotypicTargetHandler_R(phenotypic_target_handler_,fuzzy_factory_,exp_manager);
pth_array_0[i] = new SIMD_PhenotypicTargetHandler_R(phenotypic_target_handler_, fuzzy_factory_);
pth_array_0[i]->var_prng_ = std::make_shared<JumpingMT>(phenotypic_target_handler_->var_prng_->random(100000000));
}
......@@ -478,7 +478,7 @@ int main(int argc, char* argv[]) {
phenotypic_target_handler_->ApplyVariation();
pth_array = new SIMD_PhenotypicTargetHandler_R*[max_it_env];
for (int i = 0; i < max_it_env; i++) {
pth_array[i] = new SIMD_PhenotypicTargetHandler_R(phenotypic_target_handler_,fuzzy_factory_,exp_manager);
pth_array[i] = new SIMD_PhenotypicTargetHandler_R(phenotypic_target_handler_, fuzzy_factory_);
pth_array[i]->var_prng_ = std::make_shared<JumpingMT>(phenotypic_target_handler_->var_prng_->random(100000000));
pth_array[i]->ApplyVariation();
......
......@@ -168,8 +168,7 @@ int main(int argc, char* argv[]) {
SIMD_PhenotypicTargetHandler_R* pth_target =
new SIMD_PhenotypicTargetHandler_R(
exp_manager->exp_m_7_->phenotypic_target_handler_,
fuzzy_factory_,
exp_manager);
fuzzy_factory_);
pth_target->var_prng_ = std::make_shared<JumpingMT>(
exp_manager->exp_m_7_->phenotypic_target_handler_->var_prng_->random(
......@@ -550,7 +549,7 @@ void draw_phenotype(Individual_7* indiv,
fprintf( drawingfile, "%lf %lf moveto\n", margin, margin);
#ifdef __REGUL
SIMD_PhenotypicTargetHandler_R* pth_target = new SIMD_PhenotypicTargetHandler_R(handler,fuzzy_factory,exp_m);
SIMD_PhenotypicTargetHandler_R* pth_target = new SIMD_PhenotypicTargetHandler_R(handler, fuzzy_factory);
pth_target->var_prng_ = std::make_shared<JumpingMT>(handler->var_prng_->random(100000000));
......
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