From ab3098587faa14e2d46f3e3cf8b10e5a15463d19 Mon Sep 17 00:00:00 2001 From: aric Date: Wed, 14 Feb 2007 04:36:43 +0000 Subject: incorrect call to _fast_predecessor from betweenness functions when cutoff is used. Fixes #88. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40523 --- networkx/centrality.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/networkx/centrality.py b/networkx/centrality.py index 12a07dba..d2548bc7 100644 --- a/networkx/centrality.py +++ b/networkx/centrality.py @@ -62,7 +62,7 @@ def _node_betweenness(G,source,cutoff=False,normalized=True): """ # get the predecessor and path length data - (pred,length)=_fast_predecessor(G,source,cutoff) + (pred,length)=_fast_predecessor(G,source,cutoff=cutoff) # order the nodes by path length onodes = [ (l,vert) for (vert,l) in length.items() ] @@ -117,7 +117,7 @@ def _edge_betweenness(G,source,nodes,cutoff=False): """ between={} # get the predecessor data - (pred,length)=_fast_predecessor(G,source,cutoff) + (pred,length)=_fast_predecessor(G,source,cutoff=cutoff) # order the nodes by path length onodes = map(lambda k: (length[k], k), length.keys()) onodes.sort() -- cgit v1.2.1