Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Nadi Tomeh
SDA
Commits
f76c0af5
Commit
f76c0af5
authored
Nov 22, 2021
by
Rafik_Hammoutene
Browse files
Ajout des plots en pdf dynamic version
parent
ca9f6898
Pipeline
#4662
passed with stage
in 6 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
C/main.c
View file @
f76c0af5
...
...
@@ -27,7 +27,7 @@ int main(int argc,char **argv){
char
memory_allocation
;
srand
(
time
(
NULL
));
float
random_number
;
// var aléatoire
float
proba
=
0
.
9
;
// Probabilité d'insertion à 0.
9
float
proba
=
0
.
5
;
// Probabilité d'insertion à 0.
5
int
nombre_echange
;
// Nombre de swipe effectués
int
nombreDansTas
;
//Nombre qu'on insère dans le tas
...
...
@@ -78,9 +78,9 @@ int main(int argc,char **argv){
fprintf
(
stderr
,
"Standard deviation: %Lf
\n
"
,
get_standard_deviation
(
time_analysis
));
// Sauvegarde les données de l'expérience.
save_values
(
time_analysis
,
"../plots/dynamic_tas_time_p0.
9
.plot"
);
save_values
(
swap_analysis
,
"../plots/dynamic_tas_swap_p0.
9
.plot"
);
save_values
(
memory_analysis
,
"../plots/dynamic_tas_memory_p0.
9
.plot"
);
save_values
(
time_analysis
,
"../plots/dynamic_tas_time_p0.
5
.plot"
);
save_values
(
swap_analysis
,
"../plots/dynamic_tas_swap_p0.
5
.plot"
);
save_values
(
memory_analysis
,
"../plots/dynamic_tas_memory_p0.
5
.plot"
);
// Nettoyage de la mémoire avant la sortie du programme
...
...
plots/dynamic_binary_heap_p0.5_extract_amortized_time_C.pdf
0 → 100644
View file @
f76c0af5
File added
plots/dynamic_binary_heap_p0.5_extract_swap_C.pdf
0 → 100644
View file @
f76c0af5
File added
plots/dynamic_binary_heap_p0.5_extract_wasted_memory_C.pdf
0 → 100644
View file @
f76c0af5
File added
plots/dynamic_binary_heap_p0.9_extract_amortized_time_C.pdf
0 → 100644
View file @
f76c0af5
File added
plots/dynamic_binary_heap_p0.9_extract_swap_C.pdf
0 → 100644
View file @
f76c0af5
File added
plots/dynamic_binary_heap_p0.9_extract_wasted_memory_C.pdf
0 → 100644
View file @
f76c0af5
File added
plots/plot_result
View file @
f76c0af5
...
...
@@ -12,9 +12,9 @@ set xlabel "Nombre d'elements ajoutes" font "Helvetica,24"
set ylabel "Temps amorti" font "Helvetica,24"
# Nom du fichier Postscript en sortie
set output 'dynamic_binary_heap_p0.
9
_extract_amortized_time_C.pdf'
set output 'dynamic_binary_heap_p0.
5
_extract_amortized_time_C.pdf'
plot [0:100][0:100] 'dynamic_tas_time_p0.
9
.plot' using 1:3 w lines title "Amortized C avec p=0.
9
"
plot [0:100][0:100] 'dynamic_tas_time_p0.
5
.plot' using 1:3 w lines title "Amortized C avec p=0.
5
"
###############################################################
########### Affichage de l'espace mémoire gaspillé ###########
...
...
@@ -23,9 +23,9 @@ plot [0:100][0:100] 'dynamic_tas_time_p0.9.plot' using 1:3 w lines title "Amorti
set ylabel "Memoire gaspillee" font "Helvetica,24"
# Nom du fichier Postscript en sortie
set output 'dynamic_binary_heap_p0.
9
_extract_wasted_memory_C.pdf'
set output 'dynamic_binary_heap_p0.
5
_extract_wasted_memory_C.pdf'
plot [0:300][0:300] 'dynamic_tas_memory_p0.
9
.plot' using 1:2 w lines title "Espace memoire inutilise C avec p=0.
9
"
plot [0:300][0:300] 'dynamic_tas_memory_p0.
5
.plot' using 1:2 w lines title "Espace memoire inutilise C avec p=0.
5
"
#################################################################
########### Affichage du nombre de copies effectuées ###########
#################################################################
...
...
@@ -33,8 +33,8 @@ plot [0:300][0:300] 'dynamic_tas_memory_p0.9.plot' using 1:2 w lines title "Espa
set ylabel "Nombre de copies effectuees" font "Helvetica,24"
# Nom du fichier Postscript en sortie
set output 'dynamic_binary_heap_p0.
9
_extract_swap_C.pdf'
set output 'dynamic_binary_heap_p0.
5
_extract_swap_C.pdf'
plot 'dynamic_tas_swap_p0.
9
.plot' using 1:2 w boxes title "Nombre d'echange effectuees C avec p=0.
9
"
plot 'dynamic_tas_swap_p0.
5
.plot' using 1:2 w boxes title "Nombre d'echange effectuees C avec p=0.
5
"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment