Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Nadi Tomeh
SDA
Commits
8ebf355f
Commit
8ebf355f
authored
Nov 19, 2021
by
Kevin F
Browse files
UTLIMATE GOOD VERSION BY MR SPARKLE AND HUMA
parent
858195d2
Pipeline
#4648
failed with stage
in 6 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Java/Analyzer.java
View file @
8ebf355f
...
...
@@ -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
)
{
...
...
Java/Main.java
View file @
8ebf355f
...
...
@@ -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"
);
...
...
Java/Tas.java
View file @
8ebf355f
...
...
@@ -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
);
...
...
plots/fixed_binary_heap_amortize_time_java.plot
View file @
8ebf355f
0 1.
5168958E7 1516895
8
1 8
64764.0 16033722
2
297146.0 8165434
3
463404.0 5598091
4 5
56135.0 4337602
5
621762.0 3594434
6 5
38285.0 3085076
7
8
10
756.0 276017
3
8
67073
5.0 2498
993
9
741156.0 230367
8
10
640916.0 2137402
11 6
16597.0 199914
7
12
557232.0 1878987
13 7
63216.0 1793159
14
537402.0 1703462
15
630265.0 1631915
16
1282164.0 1610056
17 7
99967.0 1562404
18 7
21331.0 1515677
19 7
15091.0 1473541
20 72
4010.0 1436065
21 7
22775.0 1402098
22
855910.0 1377272
23 8
40751.0 1353945
24
790
62
1
.0 1
33047
3
0 1.
7155528E7 1715552
8
1 8
27259.0 17982787
2
332607.0 9157697
3
553338.0 6289577
4 5
00098.0 4842208
5
530010.0 3979768
6 5
12423.0 3401877
7 10
24437.0 306224
3
8
92420
5.0 2
79
498
8
9
895447.0 258392
8
10
1560754.0 2481611
11 6
99683.0 231961
7
12
784511.0 2191692
13 7
73923.0 2082633
14
679780.0 1982429
15
754677.0 1900579
16
911906.0 1838787
17 7
79046.0 1776449
18 7
39680.0 1718851
19 7
22943.0 1666434
20 72
8194.0 1619522
21 7
06034.0 1576023
22
759251.0 1538897
23 8
17143.0 1507516
24
872
62
3
.0 1
48106
3
plots/fixed_binary_heap_amortized_time_java_INCREASING.pdf
View file @
8ebf355f
No preview for this file type
plots/fixed_binary_heap_swap_java.plot
View file @
8ebf355f
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
plots/fixed_binary_heap_swap_java_INCREASING.pdf
View file @
8ebf355f
No preview for this file type
plots/fixed_binary_heap_wasted_memory_java_INCREASING.pdf
View file @
8ebf355f
No preview for this file type
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment