On 22.04.2015 10:54, François wrote:property map with a tuple, instead of a vertex object. This tuple isThis is not really a C++ thing, you are trying to access a vertex
> Hello,
>
> I realize that my C++ skill aren't sufficient to produce quality /
> maintainable / efficient code for this feature. Would you take care of
> this ?
>
> I've update my github repo <https://github.com/Fkawala/gcloud-python>,
> it compiles but does not work.
>
> The current error stack is:
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib/python2.7/dist-packages/graph_tool/topology/__init__.py", line 1337, in shortest_path
> pred_map=True)[1]
> File "/usr/lib/python2.7/dist-packages/graph_tool/topology/__init__.py", line 1263, in shortest_distance
> dist_map = dist_map[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<int32_t>.__getitem__(VertexPropertyMap<int32_t>, tuple)
> did not match C++ signature:
> __getitem__(graph_tool::PythonPropertyMap<boost::checked_vector_property_map<int, boost::typed_identity_property_map<unsigned long> > > {lvalue}, graph_tool::PythonVertex)
probably your list of targets. You need only to update line 1259 in
topology/__init__.py and exclude the case when 'target' is an
iterable. For instance:
if source is not None and target != -1:
try:
dist_map = [dist_map[t] for t in target]
except TypeError:
dist_map = dist_map[target]
It seems you are almost there!
Best,
Tiago
--
Tiago de Paula Peixoto <[hidden email]>
_______________________________________________
graph-tool mailing list
[hidden email]
http://lists.skewed.de/mailman/listinfo/graph-tool
signature.asc (836 bytes) Download Attachment--
Tiago de Paula Peixoto <[hidden email]>
If you reply to this email, your message will be added to the discussion below:http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/Mutliple-destination-Shortest-Path-Dijkstra-tp4026059p4026100.htmlTo start a new topic under Main discussion list for the graph-tool project, email [hidden email]
To unsubscribe from Main discussion list for the graph-tool project, click here.
NAML