51 #ifdef DOXYGEN |
51 #ifdef DOXYGEN |
52 template <typename PR, typename IM, typename CMP> |
52 template <typename PR, typename IM, typename CMP> |
53 #else |
53 #else |
54 template <typename PR, typename IM, typename CMP = std::less<PR> > |
54 template <typename PR, typename IM, typename CMP = std::less<PR> > |
55 #endif |
55 #endif |
56 class BinomHeap { |
56 class BinomialHeap { |
57 public: |
57 public: |
58 /// Type of the item-int map. |
58 /// Type of the item-int map. |
59 typedef IM ItemIntMap; |
59 typedef IM ItemIntMap; |
60 /// Type of the priorities. |
60 /// Type of the priorities. |
61 typedef PR Prio; |
61 typedef PR Prio; |
92 /// |
92 /// |
93 /// Constructor. |
93 /// Constructor. |
94 /// \param map A map that assigns \c int values to the items. |
94 /// \param map A map that assigns \c int values to the items. |
95 /// It is used internally to handle the cross references. |
95 /// It is used internally to handle the cross references. |
96 /// The assigned value must be \c PRE_HEAP (<tt>-1</tt>) for each item. |
96 /// The assigned value must be \c PRE_HEAP (<tt>-1</tt>) for each item. |
97 explicit BinomHeap(ItemIntMap &map) |
97 explicit BinomialHeap(ItemIntMap &map) |
98 : _min(0), _head(-1), _iim(map), _num_items(0) {} |
98 : _min(0), _head(-1), _iim(map), _num_items(0) {} |
99 |
99 |
100 /// \brief Constructor. |
100 /// \brief Constructor. |
101 /// |
101 /// |
102 /// Constructor. |
102 /// Constructor. |
103 /// \param map A map that assigns \c int values to the items. |
103 /// \param map A map that assigns \c int values to the items. |
104 /// It is used internally to handle the cross references. |
104 /// It is used internally to handle the cross references. |
105 /// The assigned value must be \c PRE_HEAP (<tt>-1</tt>) for each item. |
105 /// The assigned value must be \c PRE_HEAP (<tt>-1</tt>) for each item. |
106 /// \param comp The function object used for comparing the priorities. |
106 /// \param comp The function object used for comparing the priorities. |
107 BinomHeap(ItemIntMap &map, const Compare &comp) |
107 BinomialHeap(ItemIntMap &map, const Compare &comp) |
108 : _min(0), _head(-1), _iim(map), _comp(comp), _num_items(0) {} |
108 : _min(0), _head(-1), _iim(map), _comp(comp), _num_items(0) {} |
109 |
109 |
110 /// \brief The number of items stored in the heap. |
110 /// \brief The number of items stored in the heap. |
111 /// |
111 /// |
112 /// This function returns the number of items stored in the heap. |
112 /// This function returns the number of items stored in the heap. |