0

.

Hi guys,

I'm using Erel Segal's C++ STL FibonacciHeap http://ideone.com/9jYnv and I think it's lacking of a increase_key() method.

/**
  * template Fibonacci Heap 
  *
  * @ref http://en.wikipedia.org/wiki/Fibonacci_heap
  * @ref http://www.cse.yorku.ca/~aaw/Jason/FibonacciHeapAlgorithm.html
  * @author Erel Segal http://tora.us.fm/rentabrain
  * @date 2010-11-11
  */

I'm about to implement it myself, but I've not found many references to theoretical implementation of that.

Can you give me some tips on how increase_key operation should be done?

Cob013
  • 1,057
  • 9
  • 22

1 Answers1

1

Boost.Heap

Just use boost::heap::fibonacci_heap - it has both increase and decrease. It is reliable and tested on different platforms.

It is header-only library, which means that you don't need to compile it and link against it.

Community
  • 1
  • 1
Evgeny Panasyuk
  • 9,076
  • 1
  • 33
  • 54
  • Thanks Evgeny for your answer but unfortunately I can't use Boost libraries for my task. I'm looking for some pseudo-code interpretation for increase_key() procedure so that I can write my own versino of that. By the way I will surely read Boost implementation as well. – Cob013 Apr 23 '13 at 13:20