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

Test tri insertion tableau middle

parent db72e0f1
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("grapheFusion.png")
ggsave("graphe.png")
iTest taille temps mem algo typeTableau
1 50000 1.86 1344 i a
1 70000 3.56 1652 i a
1 90000 5.88 1892 i a
1 50000 2.34 1396 i m
1 70000 4.52 1728 i m
1 90000 7.58 1876 i m
2 50000 1.85 1388 i a
2 70000 3.54 1644 i a
2 90000 5.87 1660 i a
2 50000 2.30 1392 i m
2 70000 4.50 1736 i m
2 90000 7.42 1612 i m
3 50000 1.84 1388 i a
3 70000 3.54 1572 i a
3 90000 5.88 1884 i a
3 50000 2.35 1388 i m
3 70000 4.49 1744 i m
3 90000 7.43 1892 i m
4 50000 1.81 1288 i a
4 70000 3.53 1660 i a
4 90000 5.86 1612 i a
4 50000 2.30 1336 i m
4 70000 4.50 1656 i m
4 90000 7.42 1576 i m
5 50000 1.81 1352 i a
5 70000 3.54 1652 i a
5 90000 5.87 1552 i a
5 50000 2.30 1388 i m
5 70000 4.48 1664 i m
5 90000 7.43 1840 i m
6 50000 1.83 1400 i a
6 70000 3.54 1608 i a
6 90000 5.86 1664 i a
6 50000 2.30 1564 i m
6 70000 4.50 1552 i m
6 90000 7.43 1608 i m
7 50000 1.81 1396 i a
7 70000 3.54 1664 i a
7 90000 5.86 1616 i a
7 50000 2.27 1356 i m
7 70000 4.48 1664 i m
7 90000 7.43 1892 i m
8 50000 1.81 1288 i a
8 70000 3.54 1580 i a
8 90000 5.85 1644 i a
8 50000 2.29 1292 i m
8 70000 4.49 1612 i m
8 90000 7.40 1616 i m
9 50000 1.81 1464 i a
9 70000 3.58 1728 i a
9 90000 5.87 1616 i a
9 50000 2.29 1344 i m
9 70000 4.50 1652 i m
9 90000 7.43 1776 i m
10 50000 1.81 1336 i a
10 70000 3.55 1552 i a
10 90000 5.85 1964 i a
10 50000 2.33 1388 i m
10 70000 4.49 1608 i m
10 90000 7.42 1600 i m
......@@ -10,12 +10,12 @@ do
#taille=$(( `od -An -N4 -tu < /dev/urandom` % 1000000))
#taille=1000000
for algo in 'r' 'f'
for algo in 'i'
do
for typeTableau in 'r'
for typeTableau in 'a' 'm'
do
for taille in 100000 200000 300000
for taille in 50000 70000 90000
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

144 KiB | W: | H:

TP2/graphe.png

101 KiB | W: | H:

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

78.2 KiB

TP2/triRapideAleatoirePivotLast.png

97.1 KiB

TP2/triRapideAleatoirePivotMiddle.png

88.2 KiB

TP2/triRapideMiddle.png

78.2 KiB

TP2/triRapideMiddlePivotLast.png

95.8 KiB

TP2/triRapideMiddlePivotMiddle.png

87.4 KiB

......@@ -17,7 +17,11 @@ void sousTriRapide(long* A, size_t first, size_t size){
}
size_t partition(long* A, size_t first, size_t size) {
//long middle = (size-1) / 2;
//long pivot = A[middle];
long pivot = A[size-1];
size_t i = first;
for(int j = first; j+2 <= size; j++){
if(A[j] <= pivot){
......
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