def multi_source_dijkstra_path_length(G, sources, cutoff=None, weight='weight'):
 if (not sources):
  raise ValueError('sources must not be empty')
 weight = _weight_function(G, weight)
 dist = _dijkstra_multisource(G, sources, weight, cutoff=cutoff)
 return iter(dist.items())

def multi_source_dijkstra_path_length ( G , sources , cutoff = None , weight = 'weight' ) : if ( not sources ) : raise ValueError ( 'sources must not be empty' ) weight = _weight_function ( G , weight ) dist = _dijkstra_multisource ( G , sources , weight , cutoff = cutoff ) return iter ( dist . items ( ) )
find shortest weighted path lengths in g from a given set of source nodes .