开发者

Using a fibonacci heap, is it possible/easy to represent neighbors aswell as minimum distance

I am trying to devise an implementation of dijkstras with fibonacci heaps. What I am trying to understand is if it is possible to represent, other than the min开发者_StackOverflowimum distance in O(logn) (with delete) but the neighbors of any given node? Or does this violate the fibonacci heap structure? Otherwise I would have to build a neighbor-list aswell as a fibonacci heap.


You don't seem to understand what fibonacci heaps are!

This sturcture is independent of Dijkstra or any other shortest path algorithm, and is only used to speed up Dijkstra's algorithm, by speeding up the time to get the vertex with smallest distance.

Talking about maintain the adjacency list of neighbours as part of the the fibonacci heap structure borders on nonsense.

Of course, you could always maintain the list of neighbours corresponding to each vertex in the heap node (which is technically, not part of the heap structure) corresponding to that vertex..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜