diff --git a/src/libaevol/7/ExpManager_7.cpp b/src/libaevol/7/ExpManager_7.cpp index 35ec34b7fad5e46dae01bc5bebde001b2a9f03ef..4caee8f9e29c15181c4c38542389264da96d9873 100644 --- a/src/libaevol/7/ExpManager_7.cpp +++ b/src/libaevol/7/ExpManager_7.cpp @@ -26,7 +26,7 @@ #include "ExpManager_7.h" -#include "7/fuzzy/AbstractFuzzy_7.h" +#include "7/fuzzy/AbstractFuzzy.h" #include "7/Stats_7.h" #include "DnaMutator.h" #include "legacy/ExpManager.h" @@ -4028,8 +4028,8 @@ void ExpManager_7::compute_phenotype(Individual_7* indiv) { compute_protein_start_[indiv->indiv_id]= runtime_start.time_since_epoch().count(); #endif - AbstractFuzzy_7* activ_phenotype = fuzzy_factory_->get_fuzzy(); - AbstractFuzzy_7* inhib_phenotype = fuzzy_factory_->get_fuzzy(); + AbstractFuzzy* activ_phenotype = fuzzy_factory_->get_fuzzy(); + AbstractFuzzy* inhib_phenotype = fuzzy_factory_->get_fuzzy(); std::vector<Protein_7*> protein_vector; @@ -4101,8 +4101,8 @@ void ExpManager_7::compute_phenotype(Individual_7* indiv) { // inhib_phenotype->print(); // } - activ_phenotype->clip(AbstractFuzzy_7::max, Y_MAX); - inhib_phenotype->clip(AbstractFuzzy_7::min, - Y_MAX); + activ_phenotype->clip(AbstractFuzzy::max, Y_MAX); + inhib_phenotype->clip(AbstractFuzzy::min, - Y_MAX); activ_phenotype->simplify(); inhib_phenotype->simplify(); @@ -4116,7 +4116,7 @@ void ExpManager_7::compute_phenotype(Individual_7* indiv) { indiv->phenotype = fuzzy_factory_->get_fuzzy(); indiv->phenotype->copy(activ_phenotype); indiv->phenotype->add(inhib_phenotype); - indiv->phenotype->clip(AbstractFuzzy_7::min, Y_MIN); + indiv->phenotype->clip(AbstractFuzzy::min, Y_MIN); indiv->phenotype->simplify(); // if (indiv->indiv_id==205) { @@ -4167,7 +4167,7 @@ void ExpManager_7::compute_fitness(Individual_7* indiv, compute_fitness_start_[indiv->indiv_id] = runtime_start.time_since_epoch().count(); #endif #ifdef __REGUL - AbstractFuzzy_7* delta = fuzzy_factory_->get_fuzzy(); + AbstractFuzzy* delta = fuzzy_factory_->get_fuzzy(); delta->copy(indiv->phenotype); // if (indiv->indiv_id==0) printf("SIMD -- Step A -- Delta %lf\n",delta->get_geometric_area()); @@ -4248,7 +4248,7 @@ void ExpManager_7::compute_fitness(Individual_7* indiv, -selection_pressure * ((double) indiv->metaerror_by_env_id_[env_id])); #else - AbstractFuzzy_7* delta = fuzzy_factory_->get_fuzzy(); + AbstractFuzzy* delta = fuzzy_factory_->get_fuzzy(); // printf("%d -- Phenotype %lf : %p (%p)\n",indiv_id,current_individuals[indiv_id]->phenotype->get_geometric_area(), // current_individuals[indiv_id]->phenotype,delta); diff --git a/src/libaevol/7/ExpManager_7.h b/src/libaevol/7/ExpManager_7.h index 384dea905c3b1d044a99a4522b19a19014cd3b4a..c14e6a93b23d52607b3358df3847098ae8a993f0 100644 --- a/src/libaevol/7/ExpManager_7.h +++ b/src/libaevol/7/ExpManager_7.h @@ -223,7 +223,7 @@ void Fetch_Remote_Individual(); #ifdef __REGUL SIMD_PhenotypicTargetHandler_R* phenotypic_target_handler_; #else - AbstractFuzzy_7* target; + AbstractFuzzy* target; #endif int32_t grid_width_; diff --git a/src/libaevol/7/Individual_7.h b/src/libaevol/7/Individual_7.h index 146fcf288e5a5d04f56f02aff2b3aaebde3a37ed..533cd3f4e7a3f9b1193385aed2603898cd243bd8 100644 --- a/src/libaevol/7/Individual_7.h +++ b/src/libaevol/7/Individual_7.h @@ -79,8 +79,8 @@ class Individual_7 : public Observable { double phenotype[PHENOTYPE_VECTOR_SIZE]; double delta[PHENOTYPE_VECTOR_SIZE]; #else - AbstractFuzzy_7* phenotype = nullptr; - AbstractFuzzy_7* delta = nullptr; + AbstractFuzzy* phenotype = nullptr; + AbstractFuzzy* delta = nullptr; #endif double fitness; double metaerror; diff --git a/src/libaevol/7/fuzzy/AbstractFuzzy_7.h b/src/libaevol/7/fuzzy/AbstractFuzzy.h similarity index 89% rename from src/libaevol/7/fuzzy/AbstractFuzzy_7.h rename to src/libaevol/7/fuzzy/AbstractFuzzy.h index 6938517195e0dac25bb25808caa3db67b30f85d5..46306048a73a96ef69373c652a4e5b49ea734626 100644 --- a/src/libaevol/7/fuzzy/AbstractFuzzy_7.h +++ b/src/libaevol/7/fuzzy/AbstractFuzzy.h @@ -25,8 +25,8 @@ // **************************************************************************** -#ifndef AEVOL_ABSTRACTFUZZY_7_H -#define AEVOL_ABSTRACTFUZZY_7_H +#ifndef AEVOL_ABSTRACT_FUZZY_H +#define AEVOL_ABSTRACT_FUZZY_H #include <list> @@ -37,8 +37,7 @@ namespace aevol { -class AbstractFuzzy_7 -{ +class AbstractFuzzy { public: // ========================================================================== // Constructors @@ -47,7 +46,7 @@ class AbstractFuzzy_7 // ========================================================================== // Destructor // ========================================================================== - virtual ~AbstractFuzzy_7() {}; + virtual ~AbstractFuzzy() {}; // ========================================================================== // Public Methods @@ -55,10 +54,10 @@ class AbstractFuzzy_7 virtual void reset() = 0; virtual void simplify() = 0; virtual void add_triangle(ProteinConcentration mean, ProteinConcentration width, ProteinConcentration height, bool verbose = false) = 0; - - virtual void add(const AbstractFuzzy_7* f, bool verbose = false) = 0; - virtual void sub(const AbstractFuzzy_7* f, bool verbose = false) = 0; - virtual void copy(const AbstractFuzzy_7* f, bool verbose = false) = 0; + + virtual void add(const AbstractFuzzy* f, bool verbose = false) = 0; + virtual void sub(const AbstractFuzzy* f, bool verbose = false) = 0; + virtual void copy(const AbstractFuzzy* f, bool verbose = false) = 0; virtual void copy(const Fuzzy* f, bool verbose = false) = 0; virtual void add_point(ProteinConcentration x, ProteinConcentration y) = 0; @@ -74,7 +73,7 @@ class AbstractFuzzy_7 virtual ProteinConcentration get_geometric_area(bool verbose = false) const = 0; virtual ProteinConcentration get_geometric_area(ProteinConcentration start_segment, ProteinConcentration end_segment) const = 0; - virtual bool is_identical_to(const AbstractFuzzy_7& fs, ProteinConcentration tolerance) const = 0; + virtual bool is_identical_to(const AbstractFuzzy& fs, ProteinConcentration tolerance) const = 0; virtual void print() const = 0; @@ -103,4 +102,4 @@ class AbstractFuzzy_7 } // namespace aevol -#endif //AEVOL_AbstractFuzzy_7_H +#endif //AEVOL_ABSTRACT_FUZZY_H diff --git a/src/libaevol/7/fuzzy/Discrete_Double_Fuzzy.cpp b/src/libaevol/7/fuzzy/Discrete_Double_Fuzzy.cpp index 1dfad8705c4e483945e883e2c953c5abbce93455..9c33ec7a2fdaff9f520cd91274d34739994e683e 100644 --- a/src/libaevol/7/fuzzy/Discrete_Double_Fuzzy.cpp +++ b/src/libaevol/7/fuzzy/Discrete_Double_Fuzzy.cpp @@ -145,7 +145,7 @@ void Discrete_Double_Fuzzy::add_triangle(ProteinConcentration mean, /// Semantically speaking, we deal with fuzzy sets over the same /// range. So adding two fuzzy sets sums up to adding the probability /// functions. -void Discrete_Double_Fuzzy::add(const AbstractFuzzy_7* f, bool) { +void Discrete_Double_Fuzzy::add(const AbstractFuzzy* f, bool) { Discrete_Double_Fuzzy* fs = (Discrete_Double_Fuzzy*)(f); #if defined(__INTEL_COMPILER) __declspec(align(fs->points_)); @@ -163,7 +163,7 @@ void Discrete_Double_Fuzzy::add(const AbstractFuzzy_7* f, bool) { /// Substract to the current fuzzy set. /// /// TODO: Dumb version (?), to be completed. -void Discrete_Double_Fuzzy::sub(const AbstractFuzzy_7* f, bool) { +void Discrete_Double_Fuzzy::sub(const AbstractFuzzy* f, bool) { Discrete_Double_Fuzzy* fs = (Discrete_Double_Fuzzy*)(f); #if defined(__INTEL_COMPILER) __declspec(align(fs->points_)); @@ -179,7 +179,7 @@ void Discrete_Double_Fuzzy::sub(const AbstractFuzzy_7* f, bool) { } -void Discrete_Double_Fuzzy::copy(const AbstractFuzzy_7* f, bool) { +void Discrete_Double_Fuzzy::copy(const AbstractFuzzy* f, bool) { Discrete_Double_Fuzzy* fs = (Discrete_Double_Fuzzy*)(f); #if defined(__INTEL_COMPILER) __declspec(align(fs->points_)); @@ -253,9 +253,9 @@ void Discrete_Double_Fuzzy::clip(clipping_direction direction, #endif for (int i = 0; i < length_; i++) { - if ((direction == AbstractFuzzy_7::clipping_direction::min and + if ((direction == AbstractFuzzy::clipping_direction::min and points_[i] < bound) or - (direction == AbstractFuzzy_7::clipping_direction::max and + (direction == AbstractFuzzy::clipping_direction::max and points_[i] > bound)) points_[i] = bound; } @@ -264,7 +264,7 @@ void Discrete_Double_Fuzzy::clip(clipping_direction direction, } bool Discrete_Double_Fuzzy::is_identical_to( - const AbstractFuzzy_7&, ProteinConcentration) const { + const AbstractFuzzy&, ProteinConcentration) const { assert(false); } diff --git a/src/libaevol/7/fuzzy/Discrete_Double_Fuzzy.h b/src/libaevol/7/fuzzy/Discrete_Double_Fuzzy.h index bcc011ac8f446281a23c803c57ccc65c08151470..e0d57dfdc8b4cae4ae066077416d52ea598941f4 100644 --- a/src/libaevol/7/fuzzy/Discrete_Double_Fuzzy.h +++ b/src/libaevol/7/fuzzy/Discrete_Double_Fuzzy.h @@ -31,7 +31,7 @@ #include "macros.h" #include "Point.h" -#include "AbstractFuzzy_7.h" +#include "AbstractFuzzy.h" #include "FuzzyFactory_7.h" #include "legacy/phenotype/fuzzy/Fuzzy.h" namespace aevol { @@ -75,8 +75,7 @@ namespace aevol { /// \invariant{`points_.begin()->x == X_MIN`} /// \invariant{`prev(points_.end())->x == X_MAX`} /// \invariant{`is_increasing()`} -class Discrete_Double_Fuzzy : public AbstractFuzzy_7 -{ +class Discrete_Double_Fuzzy : public AbstractFuzzy { public: // ========================================================================== // Constructors @@ -98,9 +97,9 @@ class Discrete_Double_Fuzzy : public AbstractFuzzy_7 ProteinConcentration width, ProteinConcentration height, bool verbose = false) override; - void add(const AbstractFuzzy_7* f, bool verbose = false) override; - void sub(const AbstractFuzzy_7* f, bool verbose = false) override; - void copy(const AbstractFuzzy_7* f, bool verbose = false) override; + void add(const AbstractFuzzy* f, bool verbose = false) override; + void sub(const AbstractFuzzy* f, bool verbose = false) override; + void copy(const AbstractFuzzy* f, bool verbose = false) override; void copy(const Fuzzy* f, bool verbose = false) override; void add_point(ProteinConcentration x, ProteinConcentration y) override; void add_point(int32_t x, ProteinConcentration y); @@ -112,7 +111,7 @@ class Discrete_Double_Fuzzy : public AbstractFuzzy_7 ProteinConcentration get_geometric_area(bool verbose = false) const override; ProteinConcentration get_geometric_area(ProteinConcentration start_segment, ProteinConcentration end_segment) const override; - bool is_identical_to(const AbstractFuzzy_7& fs, ProteinConcentration tolerance) const override; + bool is_identical_to(const AbstractFuzzy& fs, ProteinConcentration tolerance) const override; void print() const override; void clear() override; double* points() { return points_; }; diff --git a/src/libaevol/7/fuzzy/FuzzyFactory_7.cpp b/src/libaevol/7/fuzzy/FuzzyFactory_7.cpp index 5163fcf14bae28e62e6c52cfaa3cc212ee8a712f..e8436762c8a2dc52f77fa2ca69cf6b932c571dee 100644 --- a/src/libaevol/7/fuzzy/FuzzyFactory_7.cpp +++ b/src/libaevol/7/fuzzy/FuzzyFactory_7.cpp @@ -25,7 +25,7 @@ // **************************************************************************** #include "FuzzyFactory_7.h" -#include "AbstractFuzzy_7.h" +#include "AbstractFuzzy.h" #include <list> #include <omp.h> #include "Vector_Fuzzy.h" @@ -54,8 +54,8 @@ FuzzyFactory_7::~FuzzyFactory_7() { list_unused_fuzzy_.clear(); } - AbstractFuzzy_7* FuzzyFactory_7::createFuzzy() { - AbstractFuzzy_7* fuzz = nullptr; +AbstractFuzzy* FuzzyFactory_7::createFuzzy() { + AbstractFuzzy* fuzz = nullptr; switch (flavor_) { case FuzzyFlavor::VECTOR: @@ -107,8 +107,8 @@ void FuzzyFactory_7::stats() { total_length_); } - AbstractFuzzy_7 *FuzzyFactory_7::get_fuzzy() { - AbstractFuzzy_7 *pop = nullptr; +AbstractFuzzy* FuzzyFactory_7::get_fuzzy() { + AbstractFuzzy* pop = nullptr; #ifdef _OPENMP if (local_list_unused_fuzzy_[omp_get_thread_num()].empty()) { @@ -143,7 +143,7 @@ void FuzzyFactory_7::stats() { return pop; } -void FuzzyFactory_7::give_back(AbstractFuzzy_7 *fuzz) { +void FuzzyFactory_7::give_back(AbstractFuzzy* fuzz) { fuzz->clear(); #ifdef _OPENMP if (local_list_unused_fuzzy_[omp_get_thread_num()].size() == local_pool_size_) { @@ -151,7 +151,7 @@ void FuzzyFactory_7::give_back(AbstractFuzzy_7 *fuzz) { // #pragma omp atomic // free_space_local++; - AbstractFuzzy_7* pop = local_list_unused_fuzzy_[omp_get_thread_num()].back(); + AbstractFuzzy* pop = local_list_unused_fuzzy_[omp_get_thread_num()].back(); local_list_unused_fuzzy_[omp_get_thread_num()].pop_back(); #pragma omp critical(pop_fuzzy) diff --git a/src/libaevol/7/fuzzy/FuzzyFactory_7.h b/src/libaevol/7/fuzzy/FuzzyFactory_7.h index 753003af6dfeb0ccaa19d04922f1315202a84601..4ea6dc24c062efde63ba86d8b6b454a43024db76 100644 --- a/src/libaevol/7/fuzzy/FuzzyFactory_7.h +++ b/src/libaevol/7/fuzzy/FuzzyFactory_7.h @@ -27,7 +27,7 @@ #ifndef AEVOL_FUZZYFACTORY_H #define AEVOL_FUZZYFACTORY_H -#include "AbstractFuzzy_7.h" +#include "AbstractFuzzy.h" namespace aevol { @@ -60,14 +60,14 @@ class FuzzyFactory_7 { void init(int pop_size); void stats(); - AbstractFuzzy_7 *get_fuzzy(); - void give_back(AbstractFuzzy_7 *fuzzy); + AbstractFuzzy* get_fuzzy(); + void give_back(AbstractFuzzy* fuzzy); private: - AbstractFuzzy_7* createFuzzy(); + AbstractFuzzy* createFuzzy(); - std::list<AbstractFuzzy_7 *> list_unused_fuzzy_; - std::vector<std::list<AbstractFuzzy_7 *>> local_list_unused_fuzzy_; + std::list<AbstractFuzzy*> list_unused_fuzzy_; + std::vector<std::list<AbstractFuzzy*>> local_list_unused_fuzzy_; FuzzyFlavor flavor_; size_t pool_size_; diff --git a/src/libaevol/7/fuzzy/Vector_Fuzzy.cpp b/src/libaevol/7/fuzzy/Vector_Fuzzy.cpp index 5073ba68a2ff5f8034ee3e05ea5bc6304f8e2e60..39ea35efd1b1c24e34a4f13ec75232171f6d728e 100644 --- a/src/libaevol/7/fuzzy/Vector_Fuzzy.cpp +++ b/src/libaevol/7/fuzzy/Vector_Fuzzy.cpp @@ -256,7 +256,7 @@ void Vector_Fuzzy::add_triangle(ProteinConcentration mean, ProteinConcentration /// Semantically speaking, we deal with fuzzy sets over the same /// range. So adding two fuzzy sets sums up to adding the probability /// functions. -void Vector_Fuzzy::add(const AbstractFuzzy_7* f, bool) { +void Vector_Fuzzy::add(const AbstractFuzzy* f, bool) { Vector_Fuzzy* fs = (Vector_Fuzzy*)(f); // assert(invariant()); @@ -277,7 +277,7 @@ void Vector_Fuzzy::add(const AbstractFuzzy_7* f, bool) { /// Substract to the current fuzzy set. /// /// TODO: Dumb version (?), to be completed. -void Vector_Fuzzy::sub(const AbstractFuzzy_7* f, bool) { +void Vector_Fuzzy::sub(const AbstractFuzzy* f, bool) { Vector_Fuzzy* fs = (Vector_Fuzzy*)(f); // assert(invariant()); @@ -298,7 +298,7 @@ void Vector_Fuzzy::sub(const AbstractFuzzy_7* f, bool) { // assert(invariant()); } -void Vector_Fuzzy::copy(const AbstractFuzzy_7* f, bool) { +void Vector_Fuzzy::copy(const AbstractFuzzy* f, bool) { Vector_Fuzzy* fs = (Vector_Fuzzy*)(f); points_.clear(); @@ -390,8 +390,8 @@ void Vector_Fuzzy::clip(clipping_direction direction, ProteinConcentration bound bound)); // could now fast forward over created point... TODO? } - if ((direction == AbstractFuzzy_7::clipping_direction::min and p->y < bound) or - (direction == AbstractFuzzy_7::clipping_direction::max and p->y > bound)) + if ((direction == AbstractFuzzy::clipping_direction::min and p->y < bound) or + (direction == AbstractFuzzy::clipping_direction::max and p->y > bound)) p->y = bound; } @@ -399,7 +399,7 @@ void Vector_Fuzzy::clip(clipping_direction direction, ProteinConcentration bound } -bool Vector_Fuzzy::is_identical_to(const AbstractFuzzy_7& f, ProteinConcentration tolerance ) const { +bool Vector_Fuzzy::is_identical_to(const AbstractFuzzy& f, ProteinConcentration tolerance ) const { const Vector_Fuzzy fs = (Vector_Fuzzy&)(f); // Since set::size() has constant complexity since C++ 11, checking // size is an inexpensive first step. diff --git a/src/libaevol/7/fuzzy/Vector_Fuzzy.h b/src/libaevol/7/fuzzy/Vector_Fuzzy.h index fb75f69cd112f16bb1fb0d98fcdf903739ff7d07..c667e6ed2abc557a63732030998f11075386f903 100644 --- a/src/libaevol/7/fuzzy/Vector_Fuzzy.h +++ b/src/libaevol/7/fuzzy/Vector_Fuzzy.h @@ -31,7 +31,7 @@ #include "macros.h" #include "Point.h" -#include "AbstractFuzzy_7.h" +#include "AbstractFuzzy.h" #include "legacy/phenotype/fuzzy/Fuzzy.h" namespace aevol { @@ -74,8 +74,7 @@ namespace aevol { /// \invariant{`points_.begin()->x == X_MIN`} /// \invariant{`prev(points_.end())->x == X_MAX`} /// \invariant{`is_increasing()`} -class Vector_Fuzzy : public AbstractFuzzy_7 -{ +class Vector_Fuzzy : public AbstractFuzzy { public: // ========================================================================== // Constructors @@ -97,9 +96,9 @@ class Vector_Fuzzy : public AbstractFuzzy_7 ProteinConcentration width, ProteinConcentration height, bool verbose = false) override; - void add(const AbstractFuzzy_7* f, bool verbose = false) override; - void sub(const AbstractFuzzy_7* f, bool verbose = false) override; - void copy(const AbstractFuzzy_7* f, bool verbose = false) override; + void add(const AbstractFuzzy* f, bool verbose = false) override; + void sub(const AbstractFuzzy* f, bool verbose = false) override; + void copy(const AbstractFuzzy* f, bool verbose = false) override; void copy(const Fuzzy* f, bool verbose = false) override; void add_point(ProteinConcentration x, ProteinConcentration y) override; @@ -121,7 +120,7 @@ class Vector_Fuzzy : public AbstractFuzzy_7 ProteinConcentration y(ProteinConcentration x, bool verbose = false) const; // get_x should be moved out of fuzzy class as it really applies to pair of points ProteinConcentration x(const Point& left, const Point& right, ProteinConcentration y) const; - bool is_identical_to(const AbstractFuzzy_7& fs, ProteinConcentration tolerance) const override; + bool is_identical_to(const AbstractFuzzy& fs, ProteinConcentration tolerance) const override; void print() const override; void clear() override; // ========================================================================== diff --git a/src/libaevol/CMakeLists.txt b/src/libaevol/CMakeLists.txt index 247c7fefbd40cfa3737b14f00d7c15e14c995990..f90ef847a82d2ceb56b2f2400d857a01231c0da6 100644 --- a/src/libaevol/CMakeLists.txt +++ b/src/libaevol/CMakeLists.txt @@ -123,7 +123,7 @@ set(libaevol_sources 7/Promoter.h 7/PromoterList.cpp 7/PromoterList.h - 7/fuzzy/AbstractFuzzy_7.h + 7/fuzzy/AbstractFuzzy.h 7/fuzzy/FuzzyFactory_7.cpp 7/fuzzy/FuzzyFactory_7.h 7/fuzzy/Discrete_Double_Fuzzy.cpp diff --git a/src/libaevol/raevol/SIMD_PhenotypicTargetHandler_R.cpp b/src/libaevol/raevol/SIMD_PhenotypicTargetHandler_R.cpp index 4d228decb2df813dfe91493e63ebe53761e5b4f7..77d6d8c8a02c8de867e5f41d357408e815212db8 100644 --- a/src/libaevol/raevol/SIMD_PhenotypicTargetHandler_R.cpp +++ b/src/libaevol/raevol/SIMD_PhenotypicTargetHandler_R.cpp @@ -81,7 +81,7 @@ SIMD_PhenotypicTargetHandler_R::SIMD_PhenotypicTargetHandler_R( sampling_ = handler->sampling(); - targets_fuzzy_by_id_ = new AbstractFuzzy_7*[nb_env_]; + targets_fuzzy_by_id_ = new AbstractFuzzy*[nb_env_]; for (int env_id = 0; env_id < nb_env_; env_id++) { targets_fuzzy_by_id_[env_id] = fuzzy_factory_->get_fuzzy(); @@ -103,8 +103,8 @@ SIMD_PhenotypicTargetHandler_R::SIMD_PhenotypicTargetHandler_R( } } // Add lower and upper bounds - targets_fuzzy_by_id_[env_id]->clip(AbstractFuzzy_7::min, Y_MIN); - targets_fuzzy_by_id_[env_id]->clip(AbstractFuzzy_7::max, Y_MAX); + targets_fuzzy_by_id_[env_id]->clip(AbstractFuzzy::min, Y_MIN); + targets_fuzzy_by_id_[env_id]->clip(AbstractFuzzy::max, Y_MAX); // Simplify (get rid of useless points) targets_fuzzy_by_id_[env_id]->simplify(); @@ -113,7 +113,7 @@ SIMD_PhenotypicTargetHandler_R::SIMD_PhenotypicTargetHandler_R( } if (var_method_ == SWITCH_IN_A_LIST) { - targets_fuzzy_ = new AbstractFuzzy_7*[nb_indiv_age_]; + targets_fuzzy_ = new AbstractFuzzy*[nb_indiv_age_]; list_env_id_ = new int16_t[nb_indiv_age_]; if (nb_env_ <= 1) { @@ -209,7 +209,7 @@ int32_t i = 0; sampling_ = handler->sampling_; - targets_fuzzy_by_id_ = new AbstractFuzzy_7*[nb_env_]; + targets_fuzzy_by_id_ = new AbstractFuzzy*[nb_env_]; for (int env_id = 0; env_id < nb_env_; env_id++) { targets_fuzzy_by_id_[env_id] = fuzzy_factory_->get_fuzzy(); @@ -217,7 +217,7 @@ int32_t i = 0; } if (var_method_ == SWITCH_IN_A_LIST) { - targets_fuzzy_ = new AbstractFuzzy_7*[nb_indiv_age_]; + targets_fuzzy_ = new AbstractFuzzy*[nb_indiv_age_]; list_env_id_ = new int16_t[nb_indiv_age_]; diff --git a/src/libaevol/raevol/SIMD_PhenotypicTargetHandler_R.h b/src/libaevol/raevol/SIMD_PhenotypicTargetHandler_R.h index 55d9a0b96ac952b73791f3469330615c9f2eb2e4..dba46e283734d91b588ac748bdffce31a188bf9a 100644 --- a/src/libaevol/raevol/SIMD_PhenotypicTargetHandler_R.h +++ b/src/libaevol/raevol/SIMD_PhenotypicTargetHandler_R.h @@ -31,7 +31,7 @@ #include "PhenotypicTargetHandler_R.h" #include "phenotype/Gaussian.h" #include "legacy/raevol/Protein_R.h" -#include "7/fuzzy/AbstractFuzzy_7.h" +#include "7/fuzzy/AbstractFuzzy.h" #include "7/fuzzy/FuzzyFactory_7.h" #include <list> #include <vector> @@ -56,8 +56,8 @@ class SIMD_PhenotypicTargetHandler_R { std::vector<Protein_7*> signals_models_; std::vector<std::list<int16_t>> env_signals_list_; - AbstractFuzzy_7** targets_fuzzy_; - AbstractFuzzy_7** targets_fuzzy_by_id_; + AbstractFuzzy** targets_fuzzy_; + AbstractFuzzy** targets_fuzzy_by_id_; PhenotypicTargetVariationMethod var_method_; diff --git a/src/post_treatments/aevol_post_create_csv_7.cpp b/src/post_treatments/aevol_post_create_csv_7.cpp index 46e89ea49374787e4f37dcee88bdf792a8648054..6ad223c62b11a36b3c24d83d8fada9e237853918 100644 --- a/src/post_treatments/aevol_post_create_csv_7.cpp +++ b/src/post_treatments/aevol_post_create_csv_7.cpp @@ -43,7 +43,7 @@ #include "aevol.h" #include "Rna_7.h" #include "Protein_7.h" -#include "7/fuzzy/AbstractFuzzy_7.h" +#include "7/fuzzy/AbstractFuzzy.h" #include "7/fuzzy/Discrete_Double_Fuzzy.h" #include "List_Metadata.h" #include "7/fuzzy/Vector_Fuzzy.h" @@ -80,7 +80,7 @@ void draw_triangles(Individual_7* indiv, // lifetime. #ifdef __REGUL void draw_phenotype(Individual_7* indiv, - AbstractFuzzy_7* target, + AbstractFuzzy* target, char* directoryName, int32_t timestep, int32_t env_id = -1, @@ -91,7 +91,7 @@ void draw_phenotype(Individual_7* indiv, DnaFactory* dna_factory = nullptr); #else void draw_phenotype(Individual_7* indiv, - AbstractFuzzy_7* target, + AbstractFuzzy* target, char* directoryName, int32_t timestep, int32_t env_id = -1, @@ -441,7 +441,7 @@ void draw_triangles(Individual_7* indiv, #ifdef __REGUL void draw_phenotype(Individual_7* indiv, - AbstractFuzzy_7* target, + AbstractFuzzy* target, char* directoryName, int32_t timestep, int32_t env_id, @@ -452,7 +452,7 @@ void draw_phenotype(Individual_7* indiv, DnaFactory* dna_factory) { #else void draw_phenotype(Individual_7* indiv, - AbstractFuzzy_7* target, + AbstractFuzzy* target, char* directoryName, int32_t timestep, int32_t env_id, diff --git a/src/post_treatments/aevol_post_create_eps_7.cpp b/src/post_treatments/aevol_post_create_eps_7.cpp index 39d53aa99a6e1e3b8a10fb06c4e9f3a3af2ae403..abc039be7817cf64c09c693a6e6e063cf0e1fe9e 100644 --- a/src/post_treatments/aevol_post_create_eps_7.cpp +++ b/src/post_treatments/aevol_post_create_eps_7.cpp @@ -43,7 +43,7 @@ #include "Rna_7.h" #include "Protein_7.h" #include "List_Metadata.h" -#include "7/fuzzy/AbstractFuzzy_7.h" +#include "7/fuzzy/AbstractFuzzy.h" #include "7/fuzzy/Discrete_Double_Fuzzy.h" #include "7/fuzzy/Vector_Fuzzy.h" using namespace aevol; @@ -77,7 +77,7 @@ void draw_triangles(Individual_7* indiv, // In the case of Raevol, the phenotype is drawn using the final concentrations // of the proteins, i.e. the ones reached after all the time steps of the // lifetime. -void draw_phenotype(Individual_7* indiv, AbstractFuzzy_7* target, +void draw_phenotype(Individual_7* indiv, AbstractFuzzy* target, char* directoryName); @@ -338,7 +338,7 @@ void draw_triangles(Individual_7* indiv, } -void draw_phenotype(Individual_7* indiv, AbstractFuzzy_7* target, +void draw_phenotype(Individual_7* indiv, AbstractFuzzy* target, char* directoryName) { const uint8_t bbsize = 200; // a4 paper: 595*842 double margin = 0.1;