Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tp2 Groupe1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simon Lecocq
Tp2 Groupe1
Commits
6fe31ba6
Commit
6fe31ba6
authored
4 months ago
by
Lecocq Simon
Browse files
Options
Downloads
Patches
Plain Diff
create table
parent
a89bcaf0
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tp_2_miso_mphf.py
+28
-28
28 additions, 28 deletions
tp_2_miso_mphf.py
with
28 additions
and
28 deletions
tp_2_miso_mphf.py
+
28
−
28
View file @
6fe31ba6
...
@@ -98,8 +98,8 @@ def get_hash_mphf(mphf, kmer):
...
@@ -98,8 +98,8 @@ def get_hash_mphf(mphf, kmer):
True
True
"""
"""
h
=
abs
(
hash
(
kmer
))
h
=
abs
(
hash
(
kmer
))
for
h
-
mphf
,
rang
in
mphf
:
for
h
_
mphf
,
rang
in
mphf
:
if
h
-
mo
hf
==
h
:
if
h
_mp
hf
==
h
:
return
rang
return
rang
def
create_hash_table
(
set_kmer
,
n
):
def
create_hash_table
(
set_kmer
,
n
):
...
@@ -123,11 +123,11 @@ def create_hash_table(set_kmer, n):
...
@@ -123,11 +123,11 @@ def create_hash_table(set_kmer, n):
>>>
all
(
kmer
in
tableau
for
kmer
in
set_kmer
)
>>>
all
(
kmer
in
tableau
for
kmer
in
set_kmer
)
True
True
"""
"""
pass
# TODO modifier
mphf
=
construction_mphf
(
set_kmer
,
n
)
# créer la mphf pour les kmers
table
=
[
-
1
for
i
in
range
(
n
)]
# initialiser un tableau de taille n (une liste)
for
h_kmer
,
rang
in
mphf
:
# écrire les kmers aux adresses du tableau données par la mphf
table
[
rang
]
=
h_kmer
#
ret
o
urn
er le
table
au et la
mphf
return
table
,
mphf
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment