Skip to content
Snippets Groups Projects
Commit 9e245b18 authored by Ukhanov Ilya's avatar Ukhanov Ilya
Browse files

Experience middle

parent ce48d0ed
Branches
No related merge requests found
No preview for this file type
......@@ -4,4 +4,4 @@ ggplot(perf, aes(x=taille, y=temps, group=typeTableau, colour=as.character(algo)
geom_point() + geom_smooth() +
ggtitle("Graphes Comparaison Algos")
ggsave("graphe.png")
ggsave("grapheFusion.png")
iTest taille temps mem algo typeTableau
1 1000000 0.27 16912 f a
1 1030000 0.28 17412 f a
1 1000000 0.18 16708 f r
1 1030000 0.22 17408 f r
1 1000000 0.22 16896 f i
1 1030000 0.21 17316 f i
1 1000000 0.20 16920 f c
1 1030000 0.20 17332 f c
2 1000000 0.29 16720 f a
2 1030000 0.29 17332 f a
2 1000000 0.21 16896 f r
2 1030000 0.20 17324 f r
2 1000000 0.20 16896 f i
2 1030000 0.22 17412 f i
2 1000000 0.19 16896 f c
2 1030000 0.20 17484 f c
3 1000000 0.29 16624 f a
3 1030000 0.30 17324 f a
3 1000000 0.20 16912 f r
3 1030000 0.21 17368 f r
3 1000000 0.21 16832 f i
3 1030000 0.21 17356 f i
3 1000000 0.19 16912 f c
3 1030000 0.21 17344 f c
4 1000000 0.27 16868 f a
4 1030000 0.28 17400 f a
4 1000000 0.19 16816 f r
4 1030000 0.20 17400 f r
4 1000000 0.20 16916 f i
4 1030000 0.22 17364 f i
4 1000000 0.21 16904 f c
4 1030000 0.21 17364 f c
5 1000000 0.29 16724 f a
5 1030000 0.27 17484 f a
5 1000000 0.19 16656 f r
5 1030000 0.21 17404 f r
5 1000000 0.20 16848 f i
5 1030000 0.20 17364 f i
5 1000000 0.21 16904 f c
5 1030000 0.21 17484 f c
6 1000000 0.28 16848 f a
6 1030000 0.28 17400 f a
6 1000000 0.23 16868 f r
6 1030000 0.22 17348 f r
6 1000000 0.20 16920 f i
6 1030000 0.24 17392 f i
6 1000000 0.21 16896 f c
6 1030000 0.23 17312 f c
7 1000000 0.30 16796 f a
7 1030000 0.30 17324 f a
7 1000000 0.20 16668 f r
7 1030000 0.20 17224 f r
7 1000000 0.20 16904 f i
7 1030000 0.22 17396 f i
7 1000000 0.20 16904 f c
7 1030000 0.22 17360 f c
8 1000000 0.27 16920 f a
8 1030000 0.30 17364 f a
8 1000000 0.19 16920 f r
8 1030000 0.23 17404 f r
8 1000000 0.23 16628 f i
8 1030000 0.23 17368 f i
8 1000000 0.22 16664 f c
8 1030000 0.21 17404 f c
9 1000000 0.30 16984 f a
9 1030000 0.29 17404 f a
9 1000000 0.22 16864 f r
9 1030000 0.21 17412 f r
9 1000000 0.20 16904 f i
9 1030000 0.22 17356 f i
9 1000000 0.20 16824 f c
9 1030000 0.21 17404 f c
10 1000000 0.27 16796 f a
10 1030000 0.28 17400 f a
10 1000000 0.22 16824 f r
10 1030000 0.21 17416 f r
10 1000000 0.21 16824 f i
10 1030000 0.21 17404 f i
10 1000000 0.21 16604 f c
10 1030000 0.22 17480 f c
1 100000 37.18 8204 r r
1 200000 Command terminated by signal 11
129.38 10880 r r
......@@ -10,12 +10,12 @@ do
#taille=$(( `od -An -N4 -tu < /dev/urandom` % 1000000))
#taille=1000000
for algo in 'f'
for algo in 'r' 'f'
do
for typeTableau in 'a' 'r' 'i' 'c'
for typeTableau in 'r'
do
for taille in 1000000 1030000
for taille in 100000 200000 300000
do
res=`( /usr/bin/time -f "%U\t%M" ./main $algo $taille $typeTableau $affichage > /dev/null ) 2>&1`
echo -e "$iTest\t$taille\t$res\t$algo\t$typeTableau"
......
TP2/graphe.png

107 KiB | W: | H:

TP2/graphe.png

144 KiB | W: | H:

TP2/graphe.png
TP2/graphe.png
TP2/graphe.png
TP2/graphe.png
  • 2-up
  • Swipe
  • Onion skin
TP2/grapheFusion.png

78.2 KiB

......@@ -15,7 +15,7 @@ int main(int argc, char *argv[]) {
char typeAlgo = argv[1][0];
long taille = (long) atoi(argv[2]);
long MAX = 50;
long tab[taille];
long *tab = malloc(sizeof(long) * taille);
char typeTable = argv[3][0];
size_t afficher = (size_t) atoi(argv[4]);
......@@ -52,5 +52,7 @@ int main(int argc, char *argv[]) {
break;
}
free(tab);
return 0;
}
TP2/triRapideAleatoire.png

78.2 KiB

TP2/triRapideMiddle.png

78.2 KiB

......@@ -14,6 +14,7 @@ void affichertab(long *T, int s)
void genTab(long *T, long taille, char type, long MAX)
{
int middle = (taille / 2);
switch (type)
{
......@@ -49,6 +50,18 @@ void genTab(long *T, long taille, char type, long MAX)
}
break;
case 'm':
//Tableau Trie a moitie
for (long i = 0; i < middle; ++i)
{
T[i] = i;
}
for (long i = middle; i < taille; ++i)
{
T[i] = rand() % MAX;
}
break;
default:
break;
}
......
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