[GraphHopper] Get all edges of a Node?

Peter K peathal at yahoo.de
Mon Oct 14 10:54:25 UTC 2013


Hi Andeas,

you'll have to do it via EdgeExplorer:

EdgeExplorer explorer = graph.createEdgeExplorer(/*optionalEdgeFilter*/);

// new variable 'iter' not necessary, just to explain the concept
EdgeIterator iter = explorer.setBaseNode(nodeId);
while(iter.next()) {
   ...
}

Reuse edgeExplorer as often as you can (note: not thread safe!) and just
set the new base node. With this change our none-CH algorithms are
approx. 8% faster. Usage -> see tests or XFirstSearch

Regards,
Peter.

> Hi Peter,
>
> Where did the Graph.getEdges(int nodeID) method go?
> How can i get all edges of a node in the current version?
>
> Thanks,
> Andreas
>
>
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/graphhopper

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20131014/9cd7dfb7/attachment.html>


More information about the GraphHopper mailing list