Hi Aric,
I tried it and not work. Maybe I'm using a wrong format to represent weights?
The file has data in the format:
A B 2
B C 2
C D 3
etc
the result of the output was:
####
program:
In [49]: G = NX.read_edgelist("test.txt", create_using= NX.XDiGraph())
In [50]: NX.path.dijkstra_path_length(G, "A", "I")
---------------------------------------------------------------------------
Output:
Traceback (most recent call last):
File "test.py", line 7, in <module>
NX.path.dijkstra_path_length(G, "A", "I")
File "/Library/Python/2.5/site-packages/networkx-0.37-py2.5.egg/networkx/path.py", line 257, in dijkstra_path_length
(length,path)=single_source_dijkstra(G,source)
File "/Library/Python/2.5/site-packages/networkx-0.37-py2.5.egg/networkx/path.py", line 438, in single_source_dijkstra
vw_dist = dist[v] + G.get_edge(v,w)
TypeError: unsupported operand type(s) for +: 'int' and 'str'
####
Thanks
sergio
--
------------ooo00ooo------------
,,, Sergio Carrilho
( ',') (セルジオ カリル)
<|"|>
./"L 東京大学、江崎研究室
------------ooo00ooo------------