예제 #1
0
 def test_nodeBetweenness(self):
     nb = dict()
     nb_corr = {1:4, 2:4, 3:6, 4:12, 5:6, 6:0}
     list(dynamics.eventBetweenness_plain(self.events, nodeBetweenness=nb))
     self.assertEqual(nb, nb_corr)
예제 #2
0
 def test_nodeBetweenness_withPathEnds(self):
     nb = dict()
     nb_corr = {1:11, 2:11, 3:11, 4:16, 5:11, 6:6}
     list(dynamics.eventBetweenness_plain(self.events, nodeBetweenness=nb,
                                    include_path_ends=True))
     self.assertEqual(nb, nb_corr)
예제 #3
0
 def test_eventBetweenness(self):
     corr_result = {1:8, 2:7, 3:7, 4:10, 5:11, 6:6}
     for t, b in dynamics.eventBetweenness_plain(self.events):
         self.assertEqual(b, corr_result[t])