lemon/radix_heap.h
changeset 2263 9273fe7d850c
parent 2151 38ec4a930c05
child 2386 81b47fc5c444
     1.1 --- a/lemon/radix_heap.h	Thu Oct 26 13:35:35 2006 +0000
     1.2 +++ b/lemon/radix_heap.h	Thu Oct 26 14:20:17 2006 +0000
     1.3 @@ -54,7 +54,6 @@
     1.4    /// item, but the priority cannot be decreased under the last removed 
     1.5    /// item's priority.
     1.6    ///
     1.7 -  /// \param _Item Type of the items to be stored.  
     1.8    /// \param _ItemIntMap A read and writable Item int map, used internally
     1.9    /// to handle the cross references.
    1.10    ///
    1.11 @@ -62,11 +61,11 @@
    1.12    /// \see Dijkstra
    1.13    /// \author Balazs Dezso
    1.14  
    1.15 -  template <typename _Item, typename _ItemIntMap>
    1.16 +  template <typename _ItemIntMap>
    1.17    class RadixHeap {
    1.18  
    1.19    public:
    1.20 -    typedef _Item Item;
    1.21 +    typedef typename _ItemIntMap::Key Item;
    1.22      typedef int Prio;
    1.23      typedef _ItemIntMap ItemIntMap;
    1.24  
    1.25 @@ -299,7 +298,7 @@
    1.26      /// This method returns the item with minimum priority.  
    1.27      /// \pre The heap must be nonempty.  
    1.28      Item top() const {
    1.29 -      const_cast<RadixHeap<Item, ItemIntMap>&>(*this).moveDown();
    1.30 +      const_cast<RadixHeap<ItemIntMap>&>(*this).moveDown();
    1.31        return data[boxes[0].first].item;
    1.32      }
    1.33  
    1.34 @@ -308,7 +307,7 @@
    1.35      /// It returns the minimum priority.
    1.36      /// \pre The heap must be nonempty.
    1.37      Prio prio() const {
    1.38 -      const_cast<RadixHeap<Item, ItemIntMap>&>(*this).moveDown();
    1.39 +      const_cast<RadixHeap<ItemIntMap>&>(*this).moveDown();
    1.40        return data[boxes[0].first].prio;
    1.41       }
    1.42