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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simon Lecocq
Tp2 Groupe1
Commits
b453f695
Commit
b453f695
authored
2 months ago
by
University
Browse files
Options
Downloads
Patches
Plain Diff
Étude du facteur de charge
parent
04a9bd8e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tp_2_miso_dict.py
+20
-2
20 additions, 2 deletions
tp_2_miso_dict.py
tp_2_miso_mphf.py
+2
-3
2 additions, 3 deletions
tp_2_miso_mphf.py
with
22 additions
and
5 deletions
tp_2_miso_dict.py
+
20
−
2
View file @
b453f695
...
...
@@ -11,8 +11,26 @@ def experiment_load_factor(load_factors):
"""
Étude du facteur de charge
"""
return
[],[],[]
insertion_times
=
[]
resizing
=
[]
memory_sizes
=
[]
for
i
in
load_factors
:
d
=
{}
start_time
=
time
.
perf_counter
()
resizing_count
=
0
last_memory_size
=
sys
.
getsizeof
(
d
)
num_elements
=
int
(
i
*
100
)
for
j
in
range
(
num_elements
):
d
[
j
]
=
j
current_memory_size
=
sys
.
getsizeof
(
d
)
if
current_memory_size
!=
last_memory_size
:
resizing_count
+=
1
last_memory_size
=
current_memory_size
end_time
=
time
.
perf_counter
()
insertion_times
.
append
(
end_time
-
start_time
)
resizing
.
append
(
resizing_count
)
memory_sizes
.
append
(
last_memory_size
)
return
insertion_times
,
resizing
,
memory_sizes
def
experiment_longest
():
"""
TODO: que fait cette fonction
...
...
This diff is collapsed.
Click to expand it.
tp_2_miso_mphf.py
+
2
−
3
View file @
b453f695
...
...
@@ -7,7 +7,7 @@ import random
###### PARTIE 1 ######
def
construction_mphf
(
set_kmer
:
set
[
str
],
n
:
int
,
gamma
:
float
=
2
,
nb_niveaux
:
int
=
3
)
->
list
[
list
[
int
]]:
def
construction_mphf
(
set_kmer
:
set
[
str
],
n
:
int
,
gamma
:
float
=
100
,
nb_niveaux
:
int
=
100
)
->
list
[
list
[
int
]]:
"""
Construit une fonction de hachage minimale parfaite (MPHF) pour un ensemble de k-mers.
...
...
@@ -85,8 +85,7 @@ def get_hash_mphf(mphf, kmer):
mphf (list): Table de hachage minimale parfaite.
kmer (str): K-mer à hasher.
Returns:
int: Hash du k-mer.
Returns: int: Hash du k-mer.
Examples:
>>>
set_kmer
=
{
str
(
i
)
for
i
in
range
(
10
)}
...
...
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