Exemplo n.º 1
0
 def test_eventBetweenness_delta0(self):
     """Test with delta = 0, half_life = inf (only incident events
     have an effect)"""
     corr_result = {1:2, 2:3, 3:5, 4:4, 5:5, 6:1}
     for b,t,i,j in dynamics.eventBetweenness_PhoneEvents(self.events, 
                                                          1000000000, 0.0):
         self.assertEqual(int(round(b)), corr_result[t])
Exemplo n.º 2
0
 def test_eventBetweenness_delta1(self):
     """Test with delta = 1 (path length has no effect)"""
     corr_result = {1:19./16, 2:37./32, 3:43./32, 4:65./32, 5:2.0, 6:1.0}
     ebw_iter = dynamics.eventBetweenness_PhoneEvents(self.events, 1.0, 1.0)
     for b,t,i,j in ebw_iter:
         self.assertEqual(b, corr_result[t])