From e65fba6d64b2555f278a488d29f49266c38638d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Chlo=C3=A9=20Muller?= <chloe.muller@student-cs.fr>
Date: Tue, 28 Jan 2020 08:43:16 +0100
Subject: [PATCH] Correction de la fonction individu

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

diff --git a/individu.py b/individu.py
index 02c676c..380d402 100644
--- a/individu.py
+++ b/individu.py
@@ -1,5 +1,5 @@
-from table_rotation import table_rotation
-from traj3D import *
+from Initialisation import table_rotation
+from Traj3D import *
 import numpy as np
 from math import sqrt
 
@@ -16,18 +16,21 @@ class Individu():
 
         first_nucleotide = traj_array[0, :]
         last_nucleotide = traj_array[-1, :]
-        distance = sqrt(sum((last_nucleotide - last_nucleotide) ** 2))
+        distance = sqrt(sum((first_nucleotide - last_nucleotide) ** 2))
 
         first_name = brin[0]
         last_name = brin[-1]
 
-        rot_computed = rot_table[last_name+first_name]
+        rot_computed = self.rot_table[last_name+first_name]
         rot_traj = first_name - last_name
         diff_angle = sum(abs(rot_computed - rot_traj))
 
         self.score = 1/(distance + diff_angle)
         
     
-    def mutation(self):
+    # def mutation(self):
 
-        return mutation
+    #     return mutation
+
+individu1 = Individu(table_rotation())
+print(individu1.rot_table.dict["AA"].x)
\ No newline at end of file
-- 
GitLab