From 037809437e28df988d55928a77b53e800af23d79 Mon Sep 17 00:00:00 2001
From: Nihama Sandra Ayumi <sandra.nihama@student-cs.fr>
Date: Thu, 30 Jan 2020 09:46:15 +0100
Subject: [PATCH] comments in mutations

---
 individu.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/individu.py b/individu.py
index 3a64ad9..c6b3ba2 100644
--- a/individu.py
+++ b/individu.py
@@ -57,6 +57,7 @@ class Individu():
 
 
     def mutation(self, proba = P1):
+        # each dinucleotide has a probability "proba" to mutate
         table_rotations = self.table.rot_table
         for doublet in sorted(table_rotations.keys()) :
             for coord in range(3):
@@ -71,6 +72,8 @@ class Individu():
                         table_rotations[doublet2][coord] = - table_rotations[doublet][coord]
 
     def mutation_with_numbers(self, proba = P1, number_of_mutations = 1):
+        # each individual has a probability "proba" to be mutated
+        # if it mutates, then a number "number_of_mutations" of chromosomes will be randomly mutated
         table_rotations = self.table.rot_table
         table_rotation_not_seen = [i for i in sorted(table_rotations.keys())]
         table_rotation_not_seen = table_rotation_not_seen[:8]
@@ -93,6 +96,9 @@ class Individu():
 
 
     def mutation_close_values(self, proba = P1, number_of_mutations = 1):
+        # each individual has a probability "proba" to be mutated
+        # if it mutates, then a number "number_of_mutations" of chromosomes will be randomly mutated
+        # according to the normal distribution around the current value of the dinucleotide
         table_rotations = self.table.rot_table
         table_rotation_not_seen = [i for i in sorted(table_rotations.keys())]
         table_rotation_not_seen = table_rotation_not_seen[:8]
-- 
GitLab