Mentions légales du service

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

add params to legal Individual_7 ctor

parent 038a75a6
No related branches found
No related tags found
No related merge requests found
......@@ -38,16 +38,17 @@
namespace aevol {
/** Individual_7 Constructor and Destructor **/
Individual_7::Individual_7(double w_max, FuzzyFactory_7* fuzzy_factory) :
w_max_(w_max),
fuzzy_factory_(fuzzy_factory) {
}
Individual_7* Individual_7::make_empty(double w_max, FuzzyFactory_7* fuzzy_factory) {
Individual_7* indiv = new Individual_7();
Individual_7* indiv = new Individual_7(w_max, fuzzy_factory);
indiv->w_max_ = w_max;
indiv->usage_count_ = 1;
indiv->annotated_chromosome_= AnnotatedChromosome::make_empty();
indiv->fuzzy_factory_ = fuzzy_factory;
return indiv;
}
......@@ -59,14 +60,11 @@ Individual_7* Individual_7::make_clone(Individual_7* orig,
Individual_7* Individual_7::make_clone(Individual_7* orig,
FuzzyFactory_7* fuzzy_factory) {
#endif
Individual_7* indiv = new Individual_7();
indiv->w_max_ = orig->w_max_;
Individual_7* indiv = new Individual_7(orig->w_max_, fuzzy_factory);
indiv->annotated_chromosome_= AnnotatedChromosome::make_clone(orig->annotated_chromosome_, indiv);
indiv->usage_count_ = 1;
indiv->fuzzy_factory_ = fuzzy_factory;
#ifdef __REGUL
if (not no_metadata && exp_manager->exp_s()->get_with_heredity()) {
......
......@@ -51,14 +51,17 @@ class Promoter;
class Rna_7;
class Individual_7 : public Observable {
private:
Individual_7() = default;
public:
Individual_7() = delete;
Individual_7(const Individual_7&) = delete;
Individual_7(Individual_7&&) = delete;
Individual_7& operator=(const Individual_7&) = delete;
Individual_7& operator=(Individual_7&&) = delete;
private:
Individual_7(double w_max, FuzzyFactory_7* fuzzy_factory);
public:
static Individual_7* make_empty(double w_max, FuzzyFactory_7* fuzzy_factory);
#ifdef __REGUL
......@@ -133,9 +136,9 @@ class Individual_7 : public Observable {
int32_t usage_count_ = 1;
FuzzyFactory_7* fuzzy_factory_;
double w_max_;
FuzzyFactory_7* fuzzy_factory_;
};
} // namespace aevol
......
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