lemon/bucket_heap.h
changeset 2263 9273fe7d850c
parent 2110 4b8153513f34
child 2386 81b47fc5c444
     1.1 --- a/lemon/bucket_heap.h	Thu Oct 26 13:35:35 2006 +0000
     1.2 +++ b/lemon/bucket_heap.h	Thu Oct 26 14:20:17 2006 +0000
     1.3 @@ -41,16 +41,15 @@
     1.4    /// \f$ [0..C) \f$ range a list of items. So it should be used only when 
     1.5    /// the priorities are small. It is not intended to use as dijkstra heap.
     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    /// \param minimize If the given parameter is true then the heap gives back
    1.11    /// the lowest priority. 
    1.12 -  template <typename _Item, typename _ItemIntMap, bool minimize = true >
    1.13 +  template <typename _ItemIntMap, bool minimize = true >
    1.14    class BucketHeap {
    1.15  
    1.16    public:
    1.17 -    typedef _Item Item;
    1.18 +    typedef typename _ItemIntMap::Key Item;
    1.19      typedef int Prio;
    1.20      typedef std::pair<Item, Prio> Pair;
    1.21      typedef _ItemIntMap ItemIntMap;
    1.22 @@ -326,11 +325,11 @@
    1.23    }; // class BucketHeap
    1.24  
    1.25  
    1.26 -  template <typename _Item, typename _ItemIntMap>
    1.27 -  class BucketHeap<_Item, _ItemIntMap, false> {
    1.28 +  template <typename _ItemIntMap>
    1.29 +  class BucketHeap<_ItemIntMap, false> {
    1.30  
    1.31    public:
    1.32 -    typedef _Item Item;
    1.33 +    typedef typename _ItemIntMap::Key Item;
    1.34      typedef int Prio;
    1.35      typedef std::pair<Item, Prio> Pair;
    1.36      typedef _ItemIntMap ItemIntMap;
    1.37 @@ -524,18 +523,17 @@
    1.38    /// other way it does not supports erasing each elements just the
    1.39    /// minimal and it does not supports key increasing, decreasing.
    1.40    ///
    1.41 -  /// \param _Item Type of the items to be stored.  
    1.42    /// \param _ItemIntMap A read and writable Item int map, used internally
    1.43    /// to handle the cross references.
    1.44    /// \param minimize If the given parameter is true then the heap gives back
    1.45    /// the lowest priority.
    1.46    ///
    1.47    /// \sa BucketHeap 
    1.48 -  template <typename _Item, typename _ItemIntMap, bool minimize = true >
    1.49 +  template <typename _ItemIntMap, bool minimize = true >
    1.50    class SimpleBucketHeap {
    1.51  
    1.52    public:
    1.53 -    typedef _Item Item;
    1.54 +    typedef typename _ItemIntMap::Key Item;
    1.55      typedef int Prio;
    1.56      typedef std::pair<Item, Prio> Pair;
    1.57      typedef _ItemIntMap ItemIntMap;
    1.58 @@ -709,11 +707,11 @@
    1.59  
    1.60    }; // class SimpleBucketHeap
    1.61  
    1.62 -  template <typename _Item, typename _ItemIntMap>
    1.63 -  class SimpleBucketHeap<_Item, _ItemIntMap, false> {
    1.64 +  template <typename _ItemIntMap>
    1.65 +  class SimpleBucketHeap<_ItemIntMap, false> {
    1.66  
    1.67    public:
    1.68 -    typedef _Item Item;
    1.69 +    typedef typename _ItemIntMap::Key Item;
    1.70      typedef int Prio;
    1.71      typedef std::pair<Item, Prio> Pair;
    1.72      typedef _ItemIntMap ItemIntMap;