Skip to content
Snippets Groups Projects
Commit 696f28e6 authored by Busson Loic's avatar Busson Loic
Browse files

Merge branch 'Loic2' of...

Merge branch 'Loic2' of https://gitlab-research.centralesupelec.fr/2019santosgc/ei-jeux-evolutionnaires into Loic2
parents d8fb5bc5 a4780a14
Branches Loic2
No related tags found
No related merge requests found
import mathutils
import math
import numpy
class RotTable:
"""Represents the rotation table"""
......@@ -24,17 +25,16 @@ class RotTable:
}
def __init__(self):
self.__Rot_Table = {}
self.Rot_Table = {}
for dinucleotide in RotTable.__ORIGINAL_ROT_TABLE:
self.__Rot_Table[dinucleotide] = RotTable.__ORIGINAL_ROT_TABLE[dinucleotide][:3]
self.alea()
self.Rot_Table[dinucleotide] = RotTable.__ORIGINAL_ROT_TABLE[dinucleotide][:3]
self.alea()
def alea(self):
for dinucleotide in RotTable.__ORIGINAL_ROT_TABLE:
for i in range(2):
self.__Rot_Table[dinucleotide][i] += numpy.random.uniform(low = -RotTable.__ORIGINAL_ROT_TABLE[dinucleotide][i+3], high= RotTable.__ORIGINAL_ROT_TABLE[dinucleotide][i+3])
self.Rot_Table[dinucleotide][i] += numpy.random.uniform(low = -RotTable.__ORIGINAL_ROT_TABLE[dinucleotide][i+3], high= RotTable.__ORIGINAL_ROT_TABLE[dinucleotide][i+3])
###################
......@@ -60,5 +60,5 @@ class RotTable:
###################
table1 = RotTable()
print(table1.__Rot_Table["AA"])
table1 = RotTable()
print(table1.Rot_Table["AA"])
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