Skip to content
Snippets Groups Projects
Commit 2d4f3d95 authored by Ayât Chergui's avatar Ayât Chergui
Browse files

fini

parent 036284ff
Branches main
No related tags found
No related merge requests found
...@@ -48,13 +48,13 @@ def construction_mphf(set_kmer, n, gamma=2, nb_niveaux=3): ...@@ -48,13 +48,13 @@ def construction_mphf(set_kmer, n, gamma=2, nb_niveaux=3):
tableaux.append(tableau_principal) # expliquer tableaux.append(tableau_principal) # expliquer
set_kmer_courant = collision.copy() # 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 # Construction de la MPHF
mphf = [] mphf = []
grand_tableau = [] grand_tableau = []
for tableau in tableaux: for tableau in tableaux:
grand_tableau.extend(tableau) # expliquer elle va ajouté toute les valeurs du tableau grand_tableau.extend(tableau) # expliquer
rangs = [] rangs = []
max_rang = 0 max_rang = 0
...@@ -67,7 +67,7 @@ def construction_mphf(set_kmer, n, gamma=2, nb_niveaux=3): ...@@ -67,7 +67,7 @@ def construction_mphf(set_kmer, n, gamma=2, nb_niveaux=3):
mphf.append([hacher, rangs[-1]]) mphf.append([hacher, rangs[-1]])
max_rang = max(rangs) 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 max_rang += 1
h = abs(hash(kmer)) h = abs(hash(kmer))
mphf.append([h, max_rang]) mphf.append([h, max_rang])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment