Commit 8ebf355f authored by Kevin F's avatar Kevin F
Browse files

UTLIMATE GOOD VERSION BY MR SPARKLE AND HUMA

parent 858195d2
Pipeline #4648 failed with stage
in 6 seconds
......@@ -138,7 +138,7 @@ public class Analyzer {
fr = new FileWriter(file);
for (i = 0; i < nb_swap.size(); ++i){
fr.write(i+" "+ i +" "+nb_swap.get(i)+"\n");
fr.write(i+" "+nb_swap.get(i)+"\n");
}
} catch (IOException e) {
......
......@@ -59,7 +59,7 @@ public class Main {
System.err.println("Variance :"+time_analysis.get_variance());
System.err.println("Standard deviation :"+time_analysis.get_standard_deviation());
// Sauvegarde les données de l'expérience: temps et nombre de copies effectuées par opération.
// Sauvegarde les données de l'expérience: temps et nomb*re de copies effectuées par opération.
time_analysis.save_values("../plots/fixed_binary_heap_amortize_time_java.plot");
// copy_analysis.save_values("../plots/dynamic_array_copy_java.plot");
memory_analysis.save_values("../plots/fixed_binary_heap_array_memory_java.plot");
......
......@@ -65,7 +65,7 @@ public class Tas {
//int parent = 0;
if (index >= (this.table.length)) // Si l'index n'existe pas
throw new TasException("Index inexistant");
else if(index == 0 || index == 1) // Si l'index est le premier, on retourne le premier ou si index = 1; 1-1 /2 = 0
if(index == 0 || index == 1) // Si l'index est le premier, on retourne le premier ou si index = 1; 1-1 /2 = 0
return 0;
else
return (int)((index - 1)/2); // Retourne l'index du parent
......@@ -134,8 +134,8 @@ public class Tas {
index = this.getIndexOf(key);
// Si 0, on sors
if(index == 0)
break;
//if(index == 0)
// break;
}
System.out.println("[TAS] : Nb de swap quand clé = " + key + " est égal à " + swap);
......
0 1.5168958E7 15168958
1 864764.0 16033722
2 297146.0 8165434
3 463404.0 5598091
4 556135.0 4337602
5 621762.0 3594434
6 538285.0 3085076
7 810756.0 2760173
8 670735.0 2498993
9 741156.0 2303678
10 640916.0 2137402
11 616597.0 1999147
12 557232.0 1878987
13 763216.0 1793159
14 537402.0 1703462
15 630265.0 1631915
16 1282164.0 1610056
17 799967.0 1562404
18 721331.0 1515677
19 715091.0 1473541
20 724010.0 1436065
21 722775.0 1402098
22 855910.0 1377272
23 840751.0 1353945
24 790621.0 1330473
0 1.7155528E7 17155528
1 827259.0 17982787
2 332607.0 9157697
3 553338.0 6289577
4 500098.0 4842208
5 530010.0 3979768
6 512423.0 3401877
7 1024437.0 3062243
8 924205.0 2794988
9 895447.0 2583928
10 1560754.0 2481611
11 699683.0 2319617
12 784511.0 2191692
13 773923.0 2082633
14 679780.0 1982429
15 754677.0 1900579
16 911906.0 1838787
17 779046.0 1776449
18 739680.0 1718851
19 722943.0 1666434
20 728194.0 1619522
21 706034.0 1576023
22 759251.0 1538897
23 817143.0 1507516
24 872623.0 1481063
0 0 0
1 1 1
2 2 1
3 3 2
4 4 2
5 5 2
6 6 2
7 7 3
8 8 3
9 9 3
10 10 3
11 11 3
12 12 3
13 13 3
14 14 3
15 15 4
16 16 4
17 17 4
18 18 4
19 19 4
20 20 4
21 21 4
22 22 4
23 23 4
24 24 4
0 0
1 1
2 1
3 2
4 2
5 2
6 2
7 3
8 3
9 3
10 3
11 3
12 3
13 3
14 3
15 4
16 4
17 4
18 4
19 4
20 4
21 4
22 4
23 4
24 4
Markdown is supported
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