Changeset 2263:9273fe7d850c in lemon-0.x for lemon/radix_heap.h
- Timestamp:
- 10/26/06 16:20:17 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3021
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/radix_heap.h
r2151 r2263 55 55 /// item's priority. 56 56 /// 57 /// \param _Item Type of the items to be stored.58 57 /// \param _ItemIntMap A read and writable Item int map, used internally 59 58 /// to handle the cross references. … … 63 62 /// \author Balazs Dezso 64 63 65 template <typename _Item , typename _ItemIntMap>64 template <typename _ItemIntMap> 66 65 class RadixHeap { 67 66 68 67 public: 69 typedef _ItemItem;68 typedef typename _ItemIntMap::Key Item; 70 69 typedef int Prio; 71 70 typedef _ItemIntMap ItemIntMap; … … 300 299 /// \pre The heap must be nonempty. 301 300 Item top() const { 302 const_cast<RadixHeap<Item , ItemIntMap>&>(*this).moveDown();301 const_cast<RadixHeap<ItemIntMap>&>(*this).moveDown(); 303 302 return data[boxes[0].first].item; 304 303 } … … 309 308 /// \pre The heap must be nonempty. 310 309 Prio prio() const { 311 const_cast<RadixHeap<Item , ItemIntMap>&>(*this).moveDown();310 const_cast<RadixHeap<ItemIntMap>&>(*this).moveDown(); 312 311 return data[boxes[0].first].prio; 313 312 }
Note: See TracChangeset
for help on using the changeset viewer.