Skip to content

Commit

Permalink
analysis.py: test centrality options
Browse files Browse the repository at this point in the history
  • Loading branch information
vad committed Oct 8, 2010
1 parent 183dfe9 commit a122229
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ def main():
if 'all' in centralities:
centralities = 'betweenness,pagerank,degree'.split(',')

if set(centralities).difference(
'betweenness,pagerank,degree'.split(',')):
logging.error('Unknown centrality')
sys.exit(0)

if "betweenness" in centralities:
print >> sys.stderr, "betweenness"
g.g.vs['bw'] = g.g.betweenness(weights='length', directed = True)
Expand Down

0 comments on commit a122229

Please sign in to comment.