Changeset 855:65a0521e744e in lemon1.2 for lemon/quad_heap.h
 Timestamp:
 09/29/09 13:32:01 (10 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 moved
Legend:
 Unmodified
 Added
 Removed

lemon/quad_heap.h
r706 r855 17 17 */ 18 18 19 #ifndef LEMON_ FOURARY_HEAP_H20 #define LEMON_ FOURARY_HEAP_H19 #ifndef LEMON_QUAD_HEAP_H 20 #define LEMON_QUAD_HEAP_H 21 21 22 22 ///\ingroup heaps 23 23 ///\file 24 ///\brief Fourary heap implementation.24 ///\brief Fourary (quaternary) heap implementation. 25 25 26 26 #include <vector> … … 32 32 /// \ingroup heaps 33 33 /// 34 ///\brief Fourary heap data structure. 35 /// 36 /// This class implements the \e fourary \e heap data structure. 34 ///\brief Fourary (quaternary) heap data structure. 35 /// 36 /// This class implements the \e Fourary (\e quaternary) \e heap 37 /// data structure. 37 38 /// It fully conforms to the \ref concepts::Heap "heap concept". 38 39 /// 39 /// The fourary heap is a specialization of the \ref KaryHeap "Kary heap"40 /// for <tt> K=4</tt>. It is similar to the \ref BinHeap "binary heap",40 /// The fourary heap is a specialization of the \ref DHeap "Dary heap" 41 /// for <tt>D=4</tt>. It is similar to the \ref BinHeap "binary heap", 41 42 /// but its nodes have at most four children, instead of two. 42 43 /// … … 48 49 /// 49 50 ///\sa BinHeap 50 ///\sa KaryHeap51 ///\sa DHeap 51 52 #ifdef DOXYGEN 52 53 template <typename PR, typename IM, typename CMP> … … 54 55 template <typename PR, typename IM, typename CMP = std::less<PR> > 55 56 #endif 56 class FouraryHeap {57 class QuadHeap { 57 58 public: 58 59 /// Type of the itemint map. … … 93 94 /// It is used internally to handle the cross references. 94 95 /// The assigned value must be \c PRE_HEAP (<tt>1</tt>) for each item. 95 explicit FouraryHeap(ItemIntMap &map) : _iim(map) {}96 explicit QuadHeap(ItemIntMap &map) : _iim(map) {} 96 97 97 98 /// \brief Constructor. … … 102 103 /// The assigned value must be \c PRE_HEAP (<tt>1</tt>) for each item. 103 104 /// \param comp The function object used for comparing the priorities. 104 FouraryHeap(ItemIntMap &map, const Compare &comp)105 QuadHeap(ItemIntMap &map, const Compare &comp) 105 106 : _iim(map), _comp(comp) {} 106 107 … … 336 337 } 337 338 338 }; // class FouraryHeap339 }; // class QuadHeap 339 340 340 341 } // namespace lemon
Note: See TracChangeset
for help on using the changeset viewer.