Skip to content
Snippets Groups Projects
Commit d5441c7e authored by chafiol's avatar chafiol
Browse files

fatch

parents 3c32fbad b16358ec
No related merge requests found
*.o *.o
\ No newline at end of file tri
\ No newline at end of file
Algos_1/graphe.png

63.6 KiB

...@@ -100,7 +100,6 @@ int main(int argc, char **argv){ ...@@ -100,7 +100,6 @@ int main(int argc, char **argv){
t = atoi(argv[3]); t = atoi(argv[3]);
} }
size_t l = 0; size_t l = 0;
int fd = open(argv[2], O_RDWR | O_CREAT);
tab = generate_tab(t, &l); tab = generate_tab(t, &l);
for(int i = 0; i<t; i++){ for(int i = 0; i<t; i++){
...@@ -108,7 +107,6 @@ int main(int argc, char **argv){ ...@@ -108,7 +107,6 @@ int main(int argc, char **argv){
} }
printf("."); printf(".");
printf("\n"); printf("\n");
close(fd);
// free(tab); // free(tab);
} }
......
library(ggplot2)
perf <- read.table("perf.dat", header = TRUE)
ggplot(perf, aes(x=taille, y=temps, group=tri, colour=as.character(tri))) + geom_point() +
geom_smooth() + ggtitle("Notre super graphe")
ggsave("graphe.png")
\ No newline at end of file
iTest taille tri temps mem
1 78 fusion 0.00 1592
1 78 insertion 0.00 1512
1 78 rapide 0.00 1508
2 40 fusion 0.00 1416
2 40 insertion 0.00 1488
2 40 rapide 0.00 1524
3 56 fusion 0.00 1532
3 56 insertion 0.00 1460
3 56 rapide 0.00 1460
4 21 fusion 0.00 1472
4 21 insertion 0.00 1496
4 21 rapide 0.00 1476
5 12 fusion 0.00 1492
5 12 insertion 0.00 1520
5 12 rapide 0.00 1512
6 15 fusion 0.00 1516
6 15 insertion 0.00 1468
6 15 rapide 0.00 1468
7 92 fusion 0.00 1496
7 92 insertion 0.00 1508
7 92 rapide 0.00 1528
8 68 fusion 0.00 1592
8 68 insertion 0.00 1456
8 68 rapide 0.00 1488
9 60 fusion 0.00 1488
9 60 insertion 0.00 1512
9 60 rapide 0.00 1508
10 66 fusion 0.00 1456
10 66 insertion 0.00 1528
10 66 rapide 0.00 1472
#!/bin/bash
echo -e "iTest\ttaille\ttri\ttemps\tmem"
for iTest in `seq 1 10`
do
taille=$(( `od -An -N4 -tu < /dev/urandom` % 100))
for tri in "fusion" "insertion" "rapide"
do
`( ./tri -g $tri $taille ) > tabs/$tri.txt`
res=`( /usr/bin/time -f "%U\t%M" ./tri --$tri tabs/$tri.txt > /dev/null ) 2>&1`
echo -e "$iTest\t$taille\t$tri\t$res"
done
done
\ No newline at end of file
804289383 846930886 681692777 714636915 957747793 424238335 719885386 649760492 596516649 189641421 25202362 350490027 783368690 102520059 44897763 967513926 365180540 540383426 304089172 303455736 35005211 521595368 294702567 726956429 336465782 861021530 278722862 233665123 145174067 468703135 101513929 801979802 315634022 635723058 369133069 125898167 59961393 89018456 628175011 656478042 131176229 653377373 859484421 914544919 608413784 756898537 734575198 973594324 149798315 38664370 129566413 184803526 412776091 424268980 911759956 749241873 137806862 42999170 982906996 135497281 511702305 84420925 937477084 827336327 572660336 159126505 .
804289383 846930886 681692777 714636915 957747793 424238335 719885386 649760492 596516649 189641421 25202362 350490027 783368690 102520059 44897763 967513926 365180540 540383426 304089172 303455736 35005211 521595368 294702567 726956429 336465782 861021530 278722862 233665123 145174067 468703135 101513929 801979802 315634022 635723058 369133069 125898167 59961393 89018456 628175011 656478042 131176229 653377373 859484421 914544919 608413784 756898537 734575198 973594324 149798315 38664370 129566413 184803526 412776091 424268980 911759956 749241873 137806862 42999170 982906996 135497281 511702305 84420925 937477084 827336327 572660336 159126505 .
804289383 846930886 681692777 714636915 957747793 424238335 719885386 649760492 596516649 189641421 25202362 350490027 783368690 102520059 44897763 967513926 365180540 540383426 304089172 303455736 35005211 521595368 294702567 726956429 336465782 861021530 278722862 233665123 145174067 468703135 101513929 801979802 315634022 635723058 369133069 125898167 59961393 89018456 628175011 656478042 131176229 653377373 859484421 914544919 608413784 756898537 734575198 973594324 149798315 38664370 129566413 184803526 412776091 424268980 911759956 749241873 137806862 42999170 982906996 135497281 511702305 84420925 937477084 827336327 572660336 159126505 .
File deleted
...@@ -54,7 +54,7 @@ long* generate_tab(size_t nb, size_t *l){ ...@@ -54,7 +54,7 @@ long* generate_tab(size_t nb, size_t *l){
*l= taille_tab; *l= taille_tab;
size_t i = 0; size_t i = 0;
for(i = 0; i<taille_tab; i++){ for(i = 0; i<taille_tab; i++){
long p = (long)(rand()%1000); long p = (long)(rand()%1000000000);
t[i] = p; t[i] = p;
} }
......
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