Commit d1199c38 authored by SINDT--BARET Yanis's avatar SINDT--BARET Yanis Committed by SINDT--BARET Yanis
Browse files

[Update] Update of sswm for MutationsSswm but not finished

Update of file, but not finish
parent 2d82bafd
......@@ -5,6 +5,7 @@
#include "json.hpp"
#include "JumpingMT.h"
#include "ExpManager_7.h"
#include "MutationSswm.h"
#include <fstream>
#include <iomanip>
......@@ -72,20 +73,13 @@ void from_json(const json& j, Parameters& p) {
j.at("selection_pressure").get_to(p.selection_pressure);
}
namespace aevol {
void from_json(const json& j, MutationParameters& m) {
void from_json(const json& j, MutationParametersSswm& m) {
j.at("point_mutation").get_to(m.point_mutation_rate_);
j.at("small_insertion").get_to(m.small_insertion_rate_);
j.at("small_deletion").get_to(m.small_deletion_rate_);
j.at("max_indel_size").get_to(m.max_indel_size_);
j.at("duplication").get_to(m.duplication_rate_);
j.at("deletion").get_to(m.deletion_rate_);
j.at("translocation").get_to(m.translocation_rate_);
j.at("inversion").get_to(m.inversion_rate_);
m.max_genome_length_ = 10000000;
m.min_genome_length_ = 1;
}
}
int main(int argc, char* argv[]) {
if (argc != 2)
......@@ -100,8 +94,8 @@ int main(int argc, char* argv[]) {
// Des des paramettres
Parameters p = inputs.get<Parameters>();
MutationParameters mp =
inputs.at("mutation_parameters").get<MutationParameters>();
auto mp =
inputs.at("mutation_parameters").get<MutationParametersSswm>();
#ifdef BASE_4
Dna_7::polya_length = inputs.at("polya_length").get<int8_t>();
#endif
......@@ -143,6 +137,12 @@ int main(int argc, char* argv[]) {
printf("Fitness is %e\n", individual->fitness);
printf("Meta_error is %e\n", individual->metaerror);
auto* fuzzyFac = &fuzzyFactory;
auto prng_shared_ptr = std::make_shared<aevol::JumpingMT>(prng);
// ici on crééer un shared pointeur (le truc a droite permet de faire un shared pointeur)
MutationSswm mutationSswm = MutationSswm(prng_shared_ptr, mp, fuzzyFac, target);
// TODO: Obtenir l'individu d'apres
// On veut faire une mutation
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment