Skip to content
Snippets Groups Projects
Commit 52764d0f authored by malric litiere's avatar malric litiere
Browse files

debut de plot bien

parent d17f3544
Branches
No related merge requests found
installe.packages("ggthemes")
install.packages("ggthemes")
q()
No preview for this file type
taille temps mem algo typeTableau
10000 0.00 1328 i a
10000 0.00 1392 r a
10000 0.00 1248 f a
10000 0.07 1328 i a
10000 0.00 1400 r a
10000 0.00 1404 f a
10000 0.00 1312 i t
10000 0.00 1368 r t
10000 0.00 1204 f t
10000 0.16 1284 i i
10000 0.00 1276 r i
10000 0.00 1464 f i
10000 0.00 1388 i c
10000 0.00 1284 r c
10000 0.00 1204 f c
10000 0.00 1328 i m
10000 0.00 1312 r m
10000 0.00 1208 f m
20000 0.00 1308 i a
20000 0.00 1264 r a
20000 0.00 1252 f a
20000 0.00 1252 i t
20000 0.00 1212 r t
20000 0.00 1244 f t
20000 0.58 1284 i i
20000 0.00 1388 r i
20000 0.00 1248 f i
20000 0.00 1388 i c
20000 0.00 1252 r c
20000 0.00 1252 f c
20000 0.00 1240 i m
20000 0.00 1200 r m
20000 0.00 1200 f m
30000 0.00 1336 i a
30000 0.00 1304 r a
30000 0.00 1292 f a
30000 0.00 1352 i t
30000 0.00 1344 r t
30000 0.00 1244 f t
30000 1.25 1336 i i
30000 0.00 1344 r i
30000 0.00 1256 f i
30000 0.00 1336 i c
30000 0.00 1464 r c
30000 0.00 1236 f c
30000 0.00 1236 i m
30000 0.00 1304 r m
30000 0.00 1236 f m
40000 0.00 1396 i a
40000 0.00 1340 r a
40000 0.00 1284 f a
40000 0.00 1388 i t
40000 0.00 1348 r t
40000 0.00 1264 f t
40000 2.22 1336 i i
40000 0.00 1468 r i
40000 0.00 1332 f i
40000 0.00 1388 i c
40000 0.00 1400 r c
40000 0.00 1200 f c
40000 0.00 1388 i m
40000 0.00 1336 r m
40000 0.00 1296 f m
10000 0.35 1944 r t
10000 0.00 1468 f t
10000 0.14 1332 i i
10000 0.24 1932 r i
10000 0.00 1412 f i
10000 0.00 1328 i c
10000 0.34 1948 r c
10000 0.00 1368 f c
10000 0.09 1400 i m
10000 0.01 1372 r m
10000 0.00 1404 f m
50000 1.73 1348 i a
50000 0.05 1336 r a
50000 0.01 1876 f a
50000 0.00 1444 i t
50000 8.35 4380 r t
50000 0.01 1912 f t
50000 3.44 1388 i i
50000 5.88 4520 r i
50000 0.01 1912 f i
50000 0.00 1380 i c
50000 8.36 4516 r c
50000 0.01 1972 f c
50000 2.19 1336 i m
50000 0.18 1580 r m
50000 0.01 1964 f m
100000 6.91 1924 i a
100000 0.18 1920 r a
100000 0.02 2620 f a
100000 0.00 1888 i t
100000 33.95 8000 r t
100000 0.01 2624 f t
100000 13.88 1868 i i
100000 23.74 7956 r i
100000 0.02 2636 f i
100000 0.00 1880 i c
100000 33.81 7916 r c
100000 0.01 2540 f c
100000 8.69 1844 i m
100000 0.22 2140 r m
100000 0.02 2580 f m
150000 15.55 2172 i a
150000 0.41 2180 r a
150000 0.03 3488 f a
150000 0.00 2340 i t
150000 74.78 10472 r t
150000 0.03 3532 f t
150000 31.36 2268 i i
150000 52.30 10472 r i
150000 0.03 3476 f i
150000 0.00 2172 i c
150000 74.18 10544 r c
150000 0.02 3460 f c
150000 19.32 2196 i m
150000 0.24 2520 r m
150000 0.03 3456 f m
200000 27.38 2660 i a
200000 0.70 2708 r a
200000 0.04 4156 f a
200000 0.00 2696 i t
200000 118.81 10864 r t
200000 0.04 4192 f t
200000 56.37 2708 i i
200000 83.91 10868 r i
200000 0.04 4152 f i
200000 0.00 2608 i c
200000 119.03 11004 r c
200000 0.04 4184 f c
200000 34.68 2656 i m
200000 6.05 5032 r m
200000 0.04 4204 f m
......@@ -15,7 +15,7 @@ int main(int argc, char *argv[])
char typeTable = argv[2][0];
char typeAlgo = argv[3][0];
long *tab = malloc(sizeof(long) * taille);
long MAX = 200;
long MAX = 10000;
genTable(tab, taille, typeTable, MAX);
......@@ -39,4 +39,4 @@ int main(int argc, char *argv[])
free(tab);
return 0;
}
\ No newline at end of file
}
......@@ -2,19 +2,14 @@
echo "taille\ttemps\tmem\talgo\ttypeTableau\n"
for taille in 10000 20000 30000 40000
for taille in 10000 50000 100000 150000 200000
do
for typeTableau in 'a' 't' 'i' 'c' 'm'
do
for algo in 'i' 'r' 'f'
do
<<<<<<< HEAD
res=`(/usr/bin/time -f "%U\t%M" ./main $taille $algo $typeTableau > /dev/null ) 2>&1`
res=`(/usr/bin/time -f "%U\t%M" ./main $taille $typeTableau $algo > /dev/null ) 2>&1`
echo "$taille\t$res\t$algo\t$typeTableau"
=======
res=`(/usr/bin/time -f "%Us,%MMhz" ./main $taille $typeTableau $algo > /dev/null ) 2>&1`
echo -e "$taille\t$res\t$typeTableau\t$algo"
>>>>>>> 87b3bd8204e90f4bc29c8ad70362d8b7016c553b
done
done
......
......@@ -6,17 +6,17 @@ fusion <- subset(df, algo == "f" )
insert <- subset(df, algo == "i" )
rapide <- subset(df, algo == "r" )
ggplot(fusion, aes(x = taille, y = mem, color = typeTableau)) +
ggplot(fusion, aes(x = taille, y = temps, color = typeTableau)) +
geom_smooth()+ ggtitle("test tris fusion sur le temps")
ggsave("tab_fusion.png")
ggplot(insert, aes(x = taille, y = mem, color = typeTableau)) +
ggplot(insert, aes(x = taille, y = temps, color = typeTableau)) +
geom_smooth()+ ggtitle("test tris inset sur le temps")
ggsave("tab_insert.png")
ggplot(rapide, aes(x = taille, y = mem, color = typeTableau)) +
ggplot(rapide, aes(x = taille, y = temps, color = typeTableau)) +
geom_smooth()+ ggtitle("test tris rapide sur le temps")
ggsave("tab_rapide.png")
library(ggplot2)
library(plyr)
library(ggthemes)
df <- read.table("data", sep="\t", header=TRUE)
fusion <- subset(df, algo == "f" )
insert <- subset(df, algo == "i" )
rapide <- subset(df, algo == "r" )
ggplot(df, aes(x=taille, y= mem, color = algo))
ggplot(fusion, aes(x = taille, y = temps, color = typeTableau)) +
geom_smooth(size=1.5,alpha=0.8)+ geom_point()+ labs(title="test tri",subtitle="tri fusion en fonction du temps",x="Taille",y="Temps", color = "Type tableau")+
theme_fivethirtyeight()+theme(axis.title=element_text())
ggsave("tab_fusion2.png")
ggplot(insert, aes(x = taille, y = temps, color = typeTableau)) +
geom_smooth(size=1.5,alpha=0.8)+ geom_point()+ labs(title="test tri",subtitle="tri insert en fonction du temps",x="Taille",y="Temps", color = "Type tableau")+
theme_fivethirtyeight()+theme(axis.title=element_text())
ggsave("tab_insert2.png")
ggplot(rapide, aes(x = taille, y = temps, color = typeTableau)) +
geom_smooth(size=1.5,alpha=0.8)+ geom_point()+ labs(title="test tri",subtitle="tri rapide en fonction du temps",x="Taille",y="Temps", color = "Type tableau")+
theme_fivethirtyeight()+theme(axis.title=element_text())
ggsave("tab_rapide2.png")
#memoire
ggplot(fusion, aes(x = taille, y = mem, color = typeTableau)) +
geom_smooth(size=1.5,alpha=0.8)+ geom_point()+ labs(title="test tri",subtitle="tri fusion en de la mémoire",x="Taille",y="Temps", color = "Type tableau")+
theme_fivethirtyeight()+theme(axis.title=element_text())
ggsave("tab_fusion2meme.png")
ggplot(insert, aes(x = taille, y = mem, color = typeTableau)) +
geom_smooth(size=1.5,alpha=0.8)+ geom_point()+ labs(title="test tri",subtitle="tri insert en fonction de la mémoire",x="Taille",y="Temps", color = "Type tableau")+
theme_fivethirtyeight()+theme(axis.title=element_text())
ggsave("tab_insert2meme.png")
ggplot(rapide, aes(x = taille, y = mem, color = typeTableau)) +
geom_smooth(size=1.5,alpha=0.8)+ geom_point()+ labs(title="test tri",subtitle="tri rapide en fonction de la mémoire",x="Taille",y="Temps", color = "Type tableau")+
theme_fivethirtyeight()+theme(axis.title=element_text())
ggsave("tab_rapide2mem.png")
renduTP2/tab_fusion.png

143 KiB | W: | H:

renduTP2/tab_fusion.png

124 KiB | W: | H:

renduTP2/tab_fusion.png
renduTP2/tab_fusion.png
renduTP2/tab_fusion.png
renduTP2/tab_fusion.png
  • 2-up
  • Swipe
  • Onion skin
renduTP2/tab_fusion2.png

125 KiB

renduTP2/tab_insert.png

177 KiB | W: | H:

renduTP2/tab_insert.png

123 KiB | W: | H:

renduTP2/tab_insert.png
renduTP2/tab_insert.png
renduTP2/tab_insert.png
renduTP2/tab_insert.png
  • 2-up
  • Swipe
  • Onion skin
renduTP2/tab_insert2.png

127 KiB

renduTP2/tab_rapide.png

203 KiB | W: | H:

renduTP2/tab_rapide.png

125 KiB | W: | H:

renduTP2/tab_rapide.png
renduTP2/tab_rapide.png
renduTP2/tab_rapide.png
renduTP2/tab_rapide.png
  • 2-up
  • Swipe
  • Onion skin
renduTP2/tab_rapide2.png

129 KiB

......@@ -27,7 +27,7 @@ void genTable(long *T, long taille, char type, size_t N)
}
break;
case 'r':
case 't':
//Tableau Rangé
for (long i = 0; i < taille; ++i)
{
......@@ -66,4 +66,4 @@ void genTable(long *T, long taille, char type, size_t N)
default:
break;
}
}
\ No newline at end of file
}
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