Skip to content

Commit

Permalink
change test_centrality output name
Browse files Browse the repository at this point in the history
  • Loading branch information
Min GyeongHyo committed Jul 21, 2022
1 parent e260e3f commit 3cb14cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testers/test_centrality.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
test_dict[vid] = i

f_out.write(f'Comparing Stat: {stat_to_compare}\n\n')
f_out.write(f'{"B-rank" :<8}{"T-rank" :<8}{"vid" :<8}{"B-value" :<16}{"T-value" :<16}{"R-Err" :<8}\n')
f_out.write(f'{"SNAP-rank" :<14}{"OUR-rank" :<14}{"vid" :<8}{"SNAP-value" :<16}{"OUR-value" :<16}{"R-Err" :<8}\n')
for i in range (min(len(base_lis), len(test_lis))):
(val, vid) = base_lis[i]
t_idx = test_dict[vid]
t_val = test_lis[t_idx][0]
err = str(t_val/val - 1) if (val > 0 and t_val > 0) else "A:" + str(abs(t_val - val))
l = f'{i :<8}{t_idx :<8}{vid :<8}{val :<16}{t_val :<16}{err :<8}\n'
l = f'{i :<14}{t_idx :<14}{vid :<8}{val :<16}{t_val :<16}{err :<8}\n'
f_out.write(l)

0 comments on commit 3cb14cd

Please sign in to comment.