diff --git a/tp_2_miso_mphf.py b/tp_2_miso_mphf.py index f735a5c059e923e5f086f794efeb58c746cf327c..64403803f46b7aecfff4e4a4c82cd7dc6c12cb42 100644 --- a/tp_2_miso_mphf.py +++ b/tp_2_miso_mphf.py @@ -68,10 +68,13 @@ def construction_mphf(set_kmer, n, gamma=2, nb_niveaux=3): h_tab = grand_tableau[pos] if h_tab != -1: count += 1 - list_h_pos.append((h_tab, count)) + list_h_pos.append((h_tab, count)) + #tester et approuver par les autorité competente, fait une liste sous forme : + # [(2052854839243325982, 1), (4957333478667127183, 2), (937960722055874324, 3), (5781457990790611126, 4), (639567318783299370, 5), (8946549155908438712, 6), (2965694465669227395, 7), (2528361345495398196, 8), (4425804304571150798, 9), (8833577342042152210, 10)] + - col = [] - h = abs(hash(kmer)) + col_h = [] + col_kmer = [] for k in kmer: h = abs(hash(k)) ok = 0 @@ -79,7 +82,9 @@ def construction_mphf(set_kmer, n, gamma=2, nb_niveaux=3): if list_h_pos[e][0] == h: ok +=1 if ok ==0: - col.append(h) + col_h.append(h) #si besoin d'une liste de h qui sont pas dans tableau et qu'il faut rajouter apres + col_kmer.append(k) #pareil mais avec les kmer, jsp ce qu'on aura besoin ensuite + # compléter # hacher le kmer