Hello,
Here is a code snippet where I try to use the shortest_path function with a
precomputed predecessor_map.
targets = range(1,10)
source = 0
distances_in, pred_map = shortest_distance(graph,
source=source,
target=targets,
weights=graph.ep[EDGE_LEN],
pred_map=True)
inward_path = shortest_path(graph,
source=source,
target=targets[5],
pred_map=pred_map)
To run that code ends in:
File "/usr/lib/python2.7/dist-packages/graph_tool/topology/__init__.py",
line 1348, in shortest_path
if pred_map[target] == int(target): # no path to target
File "/usr/lib/python2.7/dist-packages/graph_tool/__init__.py", line 438,
in __getitem__
return self.__map[self.__key_trans(k)]
Boost.Python.ArgumentError: Python argument types in
VertexPropertyMap<int64_t>.__getitem__(VertexPropertyMap<int64_t>,
numpy.int64)
did not match C++ signature:
__getitem__(graph_tool::PythonPropertyMap<boost::checked_vector_property_map<long,
boost::typed_identity_property_map<unsigned long> > > {lvalue},
graph_tool::PythonVertex)
How could i circumvent that issue ?
Thanks!
François.