src/lemon/fib_heap.h
changeset 1354 5cb32ce3236a
parent 1270 806451fd084b
child 1359 1581f961cfaa
equal deleted inserted replaced
6:fb0d0a1fa1d7 7:dbd8092c08cd
    21 ///\ingroup auxdat
    21 ///\ingroup auxdat
    22 ///\brief Fibonacci Heap implementation.
    22 ///\brief Fibonacci Heap implementation.
    23 
    23 
    24 #include <vector>
    24 #include <vector>
    25 #include <functional>
    25 #include <functional>
    26 #include <math.h>
    26 #include <cmath>
    27 
    27 
    28 namespace lemon {
    28 namespace lemon {
    29   
    29   
    30   /// \addtogroup auxdat
    30   /// \addtogroup auxdat
    31   /// @{
    31   /// @{
   381 
   381 
   382   template <typename Item, typename Prio, typename ItemIntMap, 
   382   template <typename Item, typename Prio, typename ItemIntMap, 
   383     typename Compare>
   383     typename Compare>
   384   void FibHeap<Item, Prio, ItemIntMap, Compare>::balance() {      
   384   void FibHeap<Item, Prio, ItemIntMap, Compare>::balance() {      
   385 
   385 
   386     int maxdeg=int( floor( 2.08*log(double(container.size()))))+1;
   386     int maxdeg=int( std::floor( 2.08*log(double(container.size()))))+1;
   387   
   387   
   388     std::vector<int> A(maxdeg,-1); 
   388     std::vector<int> A(maxdeg,-1); 
   389     
   389     
   390     /*
   390     /*
   391      *Recall that now minimum does not point to the minimum prio element.
   391      *Recall that now minimum does not point to the minimum prio element.