From 2d4f3d9577191e35c3ca831f79e0c80be7a300e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ay=C3=A2t=20Chergui?= <ayat@Ordinateur-portable-de-Ayat.local> Date: Tue, 11 Mar 2025 08:01:01 +0100 Subject: [PATCH] fini --- TP2_hachage/tp_2_miso_mphf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TP2_hachage/tp_2_miso_mphf.py b/TP2_hachage/tp_2_miso_mphf.py index 6bbf6a8..6d38867 100644 --- a/TP2_hachage/tp_2_miso_mphf.py +++ b/TP2_hachage/tp_2_miso_mphf.py @@ -48,13 +48,13 @@ def construction_mphf(set_kmer, n, gamma=2, nb_niveaux=3): tableaux.append(tableau_principal) # expliquer set_kmer_courant = collision.copy() # expliquer - collision = set() # expliquer je pense que c'est pour éliminer les collisoin de même valeurs + collision = set() # expliquer # Construction de la MPHF mphf = [] grand_tableau = [] for tableau in tableaux: - grand_tableau.extend(tableau) # expliquer elle va ajouté toute les valeurs du tableau + grand_tableau.extend(tableau) # expliquer rangs = [] max_rang = 0 @@ -67,7 +67,7 @@ def construction_mphf(set_kmer, n, gamma=2, nb_niveaux=3): mphf.append([hacher, rangs[-1]]) max_rang = max(rangs) - for kmer in set_kmer_courant: # gestion des collisions: expliquer les 3 lignes du dessous + for kmer in set_kmer_courant: # expliquer les 3 lignes du dessous max_rang += 1 h = abs(hash(kmer)) mphf.append([h, max_rang]) -- GitLab