-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompute_exact_temporal_bc.jl
69 lines (65 loc) · 1.86 KB
/
compute_exact_temporal_bc.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
include("src/MANTRA.jl")
path = "graphs/"
#=test
datasets = ["00_workplace.txt"]
=#
datasets = [
"01_college_msg.txt",
"02_digg_reply.txt",
"03_slashdot_reply.txt",
"04_facebook_wall.txt",
"05_topology.txt",
"06_bordeaux.txt",
"07_mathoverflow.txt",
"08_SMS.txt",
"09_askubuntu.txt",
"10_superuser.txt",
"11_wiki_talk.txt"
]
global bint = false
println("Computing Ground Truth values for the (*)-temporal betweenness ")
println("Suggestion : Go and grab a coffee ;)")
flush(stdout)
println("Computing Ground Truth values for the prefix-foremost temporal betweenness")
flush(stdout)
for gn in datasets
tg = load_temporal_graph(path*gn," ")
print_stats(tg, graph_name= gn)
flush(stdout)
result = threaded_temporal_prefix_foremost_betweenness(tg,1000,false)
nn = String(split(gn, ".t")[1])
save_results(nn,"pfm",result[1],result[2])
clean_gc()
end
println("Computing Ground Truth values for the shortest temporal betweenness")
flush(stdout)
for gn in datasets
tg = load_temporal_graph(path*gn," ")
print_stats(tg, graph_name= gn)
flush(stdout)
if gn == "06_bordeaux.txt"
global bint = true
else
global bint = false
end
result = threaded_temporal_shortest_betweenness(tg,1000,bint,false)
nn = String(split(gn, ".t")[1])
save_results(nn,"sh",result[1],result[2])
clean_gc()
end
println("Computing Ground Truth values for the shoretst-foremost temporal betweenness")
flush(stdout)
for gn in datasets
tg = load_temporal_graph(path*gn," ")
print_stats(tg, graph_name= gn)
flush(stdout)
if gn == "06_bordeaux.txt"
global bint = true
else
global bint = false
end
result =threaded_temporal_shortest_foremost_betweenness(tg,1000,bint,false)
nn = String(split(gn, ".t")[1])
save_results(nn,"sfm",result[1],result[2])
clean_gc()
end