Revision 739fe075 fiddle/heuristicbetweennesscentrality/betweenness_centrality.py
fiddle/heuristicbetweennesscentrality/betweenness_centrality.py  

135  135 
else: 
136  136 
betweenness = _accumulate_weight_basic(betweenness, S, P, sigma, s) 
137  137  
138 
print 'betweenness = %s' % betweenness 

138 
print '@@@ betweenness = %s' % betweenness


139  139 
if rescale: 
140  140 
betweenness = _rescale(betweenness, len(G), 
141  141 
normalized=normalized, 
...  ...  
259  259 
while S: 
260  260 
w = S.pop() 
261  261 
if w != s: 
262 
delta[w] += 1 

262 
delta[w] += 1 # this is the h, when w != s, then h(s, w) = 1


263  263 
coeff = delta[w] / sigma[w] 
264  264 
for v in P[w]: 
265  265 
delta[v] += sigma[v] * coeff 
Also available in: Unified diff