Has anyone actually implemented a Fibonacci-Heap efficiently?

后端 未结 4 605
执念已碎
执念已碎 2020-11-28 18:10

Has anyone of you ever implemented a Fibonacci-Heap? I did so a few years back, but it was several orders of magnitude slower than using array-based BinHeaps.

Back t

4条回答
  •  [愿得一人]
    2020-11-28 18:34

    Knuth did a comparison between fibonacci heap and binary heaps for minimum spanning trees back in 1993 for his book Stanford Graphbase. He found fibonacci to be 30 to 60 precent slower than binary heaps at the graph sizes he was testing, 128 vertices at different densities.

    The source code is in C (or rather CWEB which is a cross between C, math and TeX) in the section MILES_SPAN.

提交回复
热议问题