[graph-tool] Problems using the dijktstra search
josubg at gmail.com
Mon Jul 16 12:39:52 CEST 2012
Thanks a lot!
I can get the correct distances normal nodes but I'm getting distances for
not reachable nodes. These distances are high compared with the others
distances (cost 140 against a mean cost of 5) but nothing that can
be programmatic filtered (like a constant inf value or negative value). If
I put infinity=-1 all distances changes to -1 (also the reachable nodes).
If is use a big infinity like 100000, the unreachable nodes get this
Is this the expected result of the function?
On Thu, Jul 12, 2012 at 6:52 PM, Tiago de Paula Peixoto <tiago at skewed.de>wrote:
> 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
> > 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
> Where the infinity value is a suitably large number.
> Tiago de Paula Peixoto <tiago at skewed.de>
> graph-tool mailing list
> graph-tool at skewed.de
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the graph-tool