Cob013
Cob013

Reputation: 1067

FibonacciHeap increase_key implementation

.

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?

Upvotes: 0

Views: 269

Answers (1)

Evgeny Panasyuk
Evgeny Panasyuk

Reputation: 9189

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.

Upvotes: 1

Related Questions