Skip to content
Snippets Groups Projects
Commit fc7301f6 authored by Maxime Bachelet's avatar Maxime Bachelet
Browse files

GGplot analyse

parent dd0b11b5
Branches
No related merge requests found
taille typeTableau recursion comparaison permutation
0 aleatoire 1 1 0
0 range 1 1 0
0 inverse 1 1 0
0 constant 1 1 0
0 middle 1 1 0
2500 aleatoire 3351 51489 17024
2500 range 4999 6254998 3126249
2500 inverse 4999 4692498 1563749
2500 constant 4999 6254998 3126249
2500 middle 3753 84778 28951
5000 aleatoire 6683 110199 35628
5000 range 9999 25009998 12502499
5000 inverse 9999 18759998 6252499
5000 constant 9999 25009998 12502499
5000 middle 7151 170805 40974
7500 aleatoire 10047 185529 63193
7500 range 14999 56264998 28128749
7500 inverse 14999 42202498 14066249
7500 constant 14999 56264998 28128749
7500 middle 10543 246767 83156
10000 aleatoire 13399 252815 86878
10000 range 19999 100019998 50004999
10000 inverse 19999 75019998 25004999
10000 constant 19999 100019998 50004999
10000 middle 13891 296499 94981
12500 aleatoire 16651 308990 99354
12500 range 24999 156274998 78131249
12500 inverse 24999 117212498 39068749
12500 constant 24999 156274998 78131249
12500 middle 17307 431776 150541
15000 aleatoire 20105 390402 124687
15000 range 29999 225029998 112507499
15000 inverse 29999 168779998 56257499
15000 constant 29999 225029998 112507499
15000 middle 20599 452717 140377
17500 aleatoire 23359 488842 167525
17500 range 34999 306284998 153133749
17500 inverse 34999 229722498 76571249
17500 constant 34999 306284998 153133749
17500 middle 24103 521765 176908
20000 aleatoire 26599 565146 200024
20000 range 39999 400039998 200009999
20000 inverse 39999 300039998 100009999
20000 constant 39999 400039998 200009999
20000 middle 27583 692780 225922
22500 aleatoire 29927 593481 192892
22500 range 44999 506294998 253136249
22500 inverse 44999 379732498 126573749
22500 constant 44999 506294998 253136249
22500 middle 31233 697735 253047
25000 aleatoire 33363 692757 240882
25000 range 49999 625049998 312512499
25000 inverse 49999 468799998 156262499
25000 constant 49999 625049998 312512499
25000 middle 35243 806421 269548
27500 aleatoire 36611 830708 284353
27500 range 54999 756304998 378138749
27500 inverse 54999 567242498 189076249
27500 constant 54999 756304998 378138749
27500 middle 38867 838460 283335
30000 aleatoire 40035 847428 282461
30000 range 59999 900059998 450014999
30000 inverse 59999 675059998 225014999
30000 constant 59999 900059998 450014999
30000 middle 44403 2799058 1260220
32500 aleatoire 43277 1025783 341558
32500 range 64999 1056314998 528141249
32500 inverse 64999 792252498 264078749
32500 constant 64999 1056314998 528141249
32500 middle 47041 1373525 509928
35000 aleatoire 46621 994811 322506
35000 range 69999 1225069998 612517499
35000 inverse 69999 918819998 306267499
35000 constant 69999 1225069998 612517499
35000 middle 51553 1365461 464910
37500 aleatoire 49951 1152854 387131
37500 range 74999 1406324998 703143749
37500 inverse 74999 1054762498 351581249
37500 constant 74999 1406324998 703143749
37500 middle 54901 1556098 577716
40000 aleatoire 53255 1137806 394333
40000 range 79999 1600079998 800019999
40000 inverse 79999 1200079998 400019999
40000 constant 79999 1600079998 800019999
40000 middle 59389 1953727 708402
42500 aleatoire 56701 1278365 431143
42500 range 84999 1806334998 903146249
42500 inverse 84999 1354772498 451583749
42500 constant 84999 1806334998 903146249
42500 middle 67467 2925294 1087246
45000 aleatoire 60011 1321702 437616
45000 range 89999 2025089998 1012522499
45000 inverse 89999 1518839998 506272499
45000 constant 89999 2025089998 1012522499
45000 middle 67699 2018921 734810
47500 aleatoire 63283 1342366 444613
47500 range 94999 18446744071670929318 1128148749
47500 inverse 94999 1692282498 564086249
47500 constant 94999 18446744071670929318 1128148749
47500 middle 71647 2583970 1036174
......@@ -17,7 +17,7 @@ int main(int argc, char *argv[])
char typeTable = argv[2][0];
char typeAlgo = argv[3][0];
long *tab = malloc(sizeof(long) * taille);
long *tab_perf = malloc(sizeof(long) * 3);
long *tab_perf = malloc(sizeof(unsigned long) * 3);
long MAX = 10000;
genTable(tab, taille, typeTable, MAX);
......@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
monitor_triRapide(tab, taille,tab_perf);
printf("recursion : %ld comparaison: %ld permutation: %ld \n",tab_perf[0],tab_perf[1],tab_perf[2]);
printf("%lu %lu %lu \n",tab_perf[0],tab_perf[1],tab_perf[2]);
break;
case 'i':
......
#!/bin/sh
echo -e "taille\ttypeTableau\trecursion\tcomparaison\tpermutation" > data_rec
for i in 1
do
for taille in 0 2500 5000 7500 10000 12500 15000 17500 20000 22500 25000 27500 30000 32500 35000 37500 40000 42500 45000 47500
do
for typeTableau in 'aleatoire' 'range' 'inverse' 'constant' 'middle'
do
res=$(./sort $taille $typeTableau t)
echo -e "$taille\t$typeTableau\t$res" >> data_rec
done
done
done
library(ggplot2)
library(plyr)
library(ggthemes)
df <- read.table("data_rec", sep="\t", header=TRUE)
aleatoire <- subset(df)
#mutate(typeTableau = factor(typeTableau, labels=c('aléatoire', 'constant', 'trié inversé', 'trié à moitié', 'trié'))
#temps
ggplot(aleatoire, aes(x = taille, y = recursion, color = typeTableau)) +
geom_smooth(size=1.5,alpha=0.8)+ geom_point()+ labs(title="Test fusion : temps en fonction de taille",x="Taille",y="Temps", color = "Type tableau")+
theme_fivethirtyeight()+theme(axis.title=element_text())
ggsave("./images/nombre_recursion.png")
No preview for this file type
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment