From 1cece38efb058117af91cb373df788f2730ce481 Mon Sep 17 00:00:00 2001 From: Clara Moreno <clara.moreno.etu@univ-lille.fr> Date: Thu, 13 Feb 2025 12:06:07 +0100 Subject: [PATCH] legere modif du construction_mphf et ajout commentaire explicatif --- tp_2_miso_mphf.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tp_2_miso_mphf.py b/tp_2_miso_mphf.py index f735a5c..6440380 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 -- GitLab