[graph-tool] Problems using the dijktstra search

Tiago de Paula Peixoto tiago at skewed.de
Thu Jul 12 18:52:35 CEST 2012

On 07/12/2012 01:14 PM, josubg wrote:
> Hi all.
> I'm trying to use the dijktstra search But I have a exception.The property
> that is used a int32_t and the GraphViews aren't empty. Any clue of  what is
> my error?
> This is the code:
>         referents_graph = GraphView(graph, vfilt= lambda v:
> graph.vertex_properties["type"][v]=="referent")
>         navigable_graph = GraphView(graph, reversed=True)
>         referents = referents_graph.vertices()
>         weight = navigable_graph.edge_properties["weight"]
>         for base_referent in referents:
>             # Calculate the distance of all accessible referents
>             distances, predecessors = 
> graph_tool.search.dijkstra_search(navigable_graph,base_referent,weight)

This has been fixed now in git... As a workaround, you can also do the following:

     dijkstra_search(navigable_graph,base_referent,weight, infinity=1000000)

Where the infinity value is a suitably large number.


Tiago de Paula Peixoto <tiago at skewed.de>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <https://lists.skewed.de/pipermail/graph-tool/attachments/20120712/66b85a85/attachment.asc>

More information about the graph-tool mailing list