lemon/bin_heap.h
changeset 2538 7bdd328de87a
parent 2391 14a343be7a5a
child 2546 b5eba564bb60
equal deleted inserted replaced
11:5e6a3121bf20 12:df252865c715
    27 #include <utility>
    27 #include <utility>
    28 #include <functional>
    28 #include <functional>
    29 
    29 
    30 namespace lemon {
    30 namespace lemon {
    31 
    31 
    32   /// \ingroup auxdat
    32   ///\ingroup auxdat
    33 
    33   ///
    34   /// A Binary Heap implementation.
    34   ///\brief A Binary Heap implementation.
    35   
    35   ///
    36   ///This class implements the \e binary \e heap data structure. A \e heap
    36   ///This class implements the \e binary \e heap data structure. A \e heap
    37   ///is a data structure for storing items with specified values called \e
    37   ///is a data structure for storing items with specified values called \e
    38   ///priorities in such a way that finding the item with minimum priority is
    38   ///priorities in such a way that finding the item with minimum priority is
    39   ///efficient. \c Compare specifies the ordering of the priorities. In a heap
    39   ///efficient. \c Compare specifies the ordering of the priorities. In a heap
    40   ///one can change the priority of an item, add or erase an item, etc.
    40   ///one can change the priority of an item, add or erase an item, etc.
   227 	bubble_down(idx, PairType(i,p), data.size());
   227 	bubble_down(idx, PairType(i,p), data.size());
   228       }
   228       }
   229     }
   229     }
   230 
   230 
   231     /// \brief Decreases the priority of \c i to \c p.
   231     /// \brief Decreases the priority of \c i to \c p.
   232 
   232     ///
   233     /// This method decreases the priority of item \c i to \c p.
   233     /// This method decreases the priority of item \c i to \c p.
   234     /// \pre \c i must be stored in the heap with priority at least \c
   234     /// \pre \c i must be stored in the heap with priority at least \c
   235     /// p relative to \c Compare.
   235     /// p relative to \c Compare.
   236     /// \param i The item.
   236     /// \param i The item.
   237     /// \param p The priority.
   237     /// \param p The priority.