[Lemon-user] Fibonnaci Heap

Peter A. Kolski Peter.Kolski at physik.tu-berlin.de
Wed Nov 28 19:25:26 CET 2012


Dear LEMON Users,
from what I read, Fibonacci Heaps are faster than Binary Heaps. The latter ones work well in LEMON. The first I just can get to work. There is always a EXC_BAD_ACCESS.

Why is this happening?
Is it really worth to use FibHeaps? I have to push many arc into the heap.

Thank you very much!

Peter



int main(){
    FullGraph                   f(1000);
    FullGraph::ArcMap< int >    cost( f );
    FullGraph::ArcMap< int >    fibHeapMap( f );
    FibHeap< int, FullGraph::ArcMap<int> >    myFibHeap( fibHeapMap );
    
    for (FullGraph::ArcIt a( f ); a!=INVALID; ++a) {
        cost[a] = rnd.integer( 100 );
    }
    
    // --- first
    myFibHeap.push( f.arcFromId( 0 ), 3 );
    
    // --- second
    for (FullGraph::ArcIt a( f ); a!=INVALID; ++a){
        myFibHeap.push( a, cost[ a ]);
    }
  }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20121128/a5c00742/attachment.html>


More information about the Lemon-user mailing list