Bug #46 fixed: Superfluous template parameter in Heap concept
authormqrelly
Thu, 26 Oct 2006 14:20:17 +0000
changeset 22639273fe7d850c
parent 2262 b9a7f4115abe
child 2264 90c66dc93ca4
Bug #46 fixed: Superfluous template parameter in Heap concept
NOTE: Not every affected file tested.
lemon/bin_heap.h
lemon/bipartite_matching.h
lemon/bucket_heap.h
lemon/concepts/heap.h
lemon/dijkstra.h
lemon/fib_heap.h
lemon/fredman_tarjan.h
lemon/johnson.h
lemon/min_cost_arborescence.h
lemon/min_cut.h
lemon/prim.h
lemon/radix_heap.h
     1.1 --- a/lemon/bin_heap.h	Thu Oct 26 13:35:35 2006 +0000
     1.2 +++ b/lemon/bin_heap.h	Thu Oct 26 14:20:17 2006 +0000
     1.3 @@ -39,7 +39,6 @@
     1.4    ///efficient. \c Compare specifies the ordering of the priorities. In a heap
     1.5    ///one can change the priority of an item, add or erase an item, etc.
     1.6    ///
     1.7 -  ///\param Item Type of the items to be stored.  
     1.8    ///\param Prio Type of the priority of the items.
     1.9    ///\param ItemIntMap A read and writable Item int map, used internally
    1.10    ///to handle the cross references.
    1.11 @@ -48,12 +47,12 @@
    1.12    ///
    1.13    ///\sa FibHeap
    1.14    ///\sa Dijkstra
    1.15 -  template <typename Item, typename Prio, typename ItemIntMap,
    1.16 +  template <typename Prio, typename ItemIntMap,
    1.17  	    typename Compare = std::less<Prio> >
    1.18    class BinHeap {
    1.19  
    1.20    public:
    1.21 -    typedef Item                             ItemType;
    1.22 +    typedef typename ItemIntMap::Key         ItemType;
    1.23      typedef Prio                             PrioType;
    1.24      typedef std::pair<ItemType,PrioType>     PairType;
    1.25      typedef ItemIntMap                       ItemIntMapType;
    1.26 @@ -161,14 +160,14 @@
    1.27      /// Adds \c i to the heap with priority \c p. 
    1.28      /// \param i The item to insert.
    1.29      /// \param p The priority of the item.
    1.30 -    void push(const Item &i, const Prio &p) { push(PairType(i,p)); }
    1.31 +    void push(const ItemType &i, const Prio &p) { push(PairType(i,p)); }
    1.32  
    1.33      /// \brief Returns the item with minimum priority relative to \c Compare.
    1.34      ///
    1.35      /// This method returns the item with minimum priority relative to \c
    1.36      /// Compare.  
    1.37      /// \pre The heap must be nonempty.  
    1.38 -    Item top() const {
    1.39 +    ItemType top() const {
    1.40        return data[0].first;
    1.41      }
    1.42  
    1.43 @@ -194,7 +193,7 @@
    1.44      /// This method deletes item \c i from the heap, if \c i was
    1.45      /// already stored in the heap.
    1.46      /// \param i The item to erase. 
    1.47 -    void erase(const Item &i) {
    1.48 +    void erase(const ItemType &i) {
    1.49        rmidx(iim[i]);
    1.50      }
    1.51  
    1.52 @@ -204,7 +203,7 @@
    1.53      /// This function returns the priority of item \c i.  
    1.54      /// \pre \c i must be in the heap.
    1.55      /// \param i The item.
    1.56 -    Prio operator[](const Item &i) const {
    1.57 +    Prio operator[](const ItemType &i) const {
    1.58        int idx = iim[i];
    1.59        return data[idx].second;
    1.60      }
    1.61 @@ -216,7 +215,7 @@
    1.62      /// in the heap and sets the priority of \c i to \c p otherwise.
    1.63      /// \param i The item.
    1.64      /// \param p The priority.
    1.65 -    void set(const Item &i, const Prio &p) {
    1.66 +    void set(const ItemType &i, const Prio &p) {
    1.67        int idx = iim[i];
    1.68        if( idx < 0 ) {
    1.69  	push(i,p);
    1.70 @@ -236,7 +235,7 @@
    1.71      /// p relative to \c Compare.
    1.72      /// \param i The item.
    1.73      /// \param p The priority.
    1.74 -    void decrease(const Item &i, const Prio &p) {
    1.75 +    void decrease(const ItemType &i, const Prio &p) {
    1.76        int idx = iim[i];
    1.77        bubble_up(idx, PairType(i,p));
    1.78      }
    1.79 @@ -248,7 +247,7 @@
    1.80      /// p relative to \c Compare.
    1.81      /// \param i The item.
    1.82      /// \param p The priority.
    1.83 -    void increase(const Item &i, const Prio &p) {
    1.84 +    void increase(const ItemType &i, const Prio &p) {
    1.85        int idx = iim[i];
    1.86        bubble_down(idx, PairType(i,p), data.size());
    1.87      }
    1.88 @@ -261,7 +260,7 @@
    1.89      /// otherwise. In the latter case it is possible that \c item will
    1.90      /// get back to the heap again.
    1.91      /// \param i The item.
    1.92 -    state_enum state(const Item &i) const {
    1.93 +    state_enum state(const ItemType &i) const {
    1.94        int s = iim[i];
    1.95        if( s>=0 )
    1.96  	s=0;
    1.97 @@ -275,7 +274,7 @@
    1.98      /// better time complexity.
    1.99      /// \param i The item.
   1.100      /// \param st The state. It should not be \c IN_HEAP. 
   1.101 -    void state(const Item& i, state_enum st) {
   1.102 +    void state(const ItemType& i, state_enum st) {
   1.103        switch (st) {
   1.104        case POST_HEAP:
   1.105        case PRE_HEAP:
   1.106 @@ -292,8 +291,8 @@
   1.107    }; // class BinHeap
   1.108  
   1.109    
   1.110 -  template <typename K, typename V, typename M, typename C>
   1.111 -  int BinHeap<K,V,M,C>::bubble_up(int hole, PairType p) {
   1.112 +  template <typename V, typename M, typename C>
   1.113 +  int BinHeap<V,M,C>::bubble_up(int hole, PairType p) {
   1.114      int par = parent(hole);
   1.115      while( hole>0 && less(p,data[par]) ) {
   1.116        move(data[par],hole);
   1.117 @@ -304,8 +303,8 @@
   1.118      return hole;
   1.119    }
   1.120  
   1.121 -  template <typename K, typename V, typename M, typename C>
   1.122 -  int BinHeap<K,V,M,C>::bubble_down(int hole, PairType p, int length) {
   1.123 +  template <typename V, typename M, typename C>
   1.124 +  int BinHeap<V,M,C>::bubble_down(int hole, PairType p, int length) {
   1.125      int child = second_child(hole);
   1.126      while(child < length) {
   1.127        if( less(data[child-1], data[child]) ) {
     2.1 --- a/lemon/bipartite_matching.h	Thu Oct 26 13:35:35 2006 +0000
     2.2 +++ b/lemon/bipartite_matching.h	Thu Oct 26 14:20:17 2006 +0000
     2.3 @@ -521,7 +521,7 @@
     2.4      /// anode graph's node.
     2.5      ///
     2.6      /// \sa BinHeap
     2.7 -    typedef BinHeap<typename BpUGraph::Node, Value, HeapCrossRef> Heap;
     2.8 +    typedef BinHeap<Value, HeapCrossRef> Heap;
     2.9      
    2.10      /// \brief Instantiates a Heap.
    2.11      ///
     3.1 --- a/lemon/bucket_heap.h	Thu Oct 26 13:35:35 2006 +0000
     3.2 +++ b/lemon/bucket_heap.h	Thu Oct 26 14:20:17 2006 +0000
     3.3 @@ -41,16 +41,15 @@
     3.4    /// \f$ [0..C) \f$ range a list of items. So it should be used only when 
     3.5    /// the priorities are small. It is not intended to use as dijkstra heap.
     3.6    ///
     3.7 -  /// \param _Item Type of the items to be stored.  
     3.8    /// \param _ItemIntMap A read and writable Item int map, used internally
     3.9    /// to handle the cross references.
    3.10    /// \param minimize If the given parameter is true then the heap gives back
    3.11    /// the lowest priority. 
    3.12 -  template <typename _Item, typename _ItemIntMap, bool minimize = true >
    3.13 +  template <typename _ItemIntMap, bool minimize = true >
    3.14    class BucketHeap {
    3.15  
    3.16    public:
    3.17 -    typedef _Item Item;
    3.18 +    typedef typename _ItemIntMap::Key Item;
    3.19      typedef int Prio;
    3.20      typedef std::pair<Item, Prio> Pair;
    3.21      typedef _ItemIntMap ItemIntMap;
    3.22 @@ -326,11 +325,11 @@
    3.23    }; // class BucketHeap
    3.24  
    3.25  
    3.26 -  template <typename _Item, typename _ItemIntMap>
    3.27 -  class BucketHeap<_Item, _ItemIntMap, false> {
    3.28 +  template <typename _ItemIntMap>
    3.29 +  class BucketHeap<_ItemIntMap, false> {
    3.30  
    3.31    public:
    3.32 -    typedef _Item Item;
    3.33 +    typedef typename _ItemIntMap::Key Item;
    3.34      typedef int Prio;
    3.35      typedef std::pair<Item, Prio> Pair;
    3.36      typedef _ItemIntMap ItemIntMap;
    3.37 @@ -524,18 +523,17 @@
    3.38    /// other way it does not supports erasing each elements just the
    3.39    /// minimal and it does not supports key increasing, decreasing.
    3.40    ///
    3.41 -  /// \param _Item Type of the items to be stored.  
    3.42    /// \param _ItemIntMap A read and writable Item int map, used internally
    3.43    /// to handle the cross references.
    3.44    /// \param minimize If the given parameter is true then the heap gives back
    3.45    /// the lowest priority.
    3.46    ///
    3.47    /// \sa BucketHeap 
    3.48 -  template <typename _Item, typename _ItemIntMap, bool minimize = true >
    3.49 +  template <typename _ItemIntMap, bool minimize = true >
    3.50    class SimpleBucketHeap {
    3.51  
    3.52    public:
    3.53 -    typedef _Item Item;
    3.54 +    typedef typename _ItemIntMap::Key Item;
    3.55      typedef int Prio;
    3.56      typedef std::pair<Item, Prio> Pair;
    3.57      typedef _ItemIntMap ItemIntMap;
    3.58 @@ -709,11 +707,11 @@
    3.59  
    3.60    }; // class SimpleBucketHeap
    3.61  
    3.62 -  template <typename _Item, typename _ItemIntMap>
    3.63 -  class SimpleBucketHeap<_Item, _ItemIntMap, false> {
    3.64 +  template <typename _ItemIntMap>
    3.65 +  class SimpleBucketHeap<_ItemIntMap, false> {
    3.66  
    3.67    public:
    3.68 -    typedef _Item Item;
    3.69 +    typedef typename _ItemIntMap::Key Item;
    3.70      typedef int Prio;
    3.71      typedef std::pair<Item, Prio> Pair;
    3.72      typedef _ItemIntMap ItemIntMap;
     4.1 --- a/lemon/concepts/heap.h	Thu Oct 26 13:35:35 2006 +0000
     4.2 +++ b/lemon/concepts/heap.h	Thu Oct 26 14:20:17 2006 +0000
     4.3 @@ -36,9 +36,12 @@
     4.4      ///
     4.5      /// A concept structure describes the main interface of heaps.
     4.6      ///
     4.7 -    template <typename Item, typename Prio, typename ItemIntMap>
     4.8 +    template <typename Prio, typename ItemIntMap>
     4.9      class Heap {
    4.10      public:
    4.11 +
    4.12 +      ///\brief Type of the items stored in the heap.
    4.13 +      typedef typename ItemIntMap::Key  Item;
    4.14    
    4.15  
    4.16        /// \brief Type to represent the items states.
     5.1 --- a/lemon/dijkstra.h	Thu Oct 26 13:35:35 2006 +0000
     5.2 +++ b/lemon/dijkstra.h	Thu Oct 26 14:20:17 2006 +0000
     5.3 @@ -73,8 +73,7 @@
     5.4      ///
     5.5      ///\sa BinHeap
     5.6      ///\sa Dijkstra
     5.7 -    typedef BinHeap<typename Graph::Node, typename LM::Value,
     5.8 -		    HeapCrossRef, std::less<Value> > Heap;
     5.9 +    typedef BinHeap<typename LM::Value, HeapCrossRef, std::less<Value> > Heap;
    5.10  
    5.11      static Heap *createHeap(HeapCrossRef& R) 
    5.12      {
    5.13 @@ -847,8 +846,7 @@
    5.14      ///
    5.15      ///\sa BinHeap
    5.16      ///\sa Dijkstra
    5.17 -    typedef BinHeap<typename Graph::Node, typename LM::Value,
    5.18 -		    typename GR::template NodeMap<int>,
    5.19 +    typedef BinHeap<typename LM::Value, typename GR::template NodeMap<int>,
    5.20  		    std::less<Value> > Heap;
    5.21  
    5.22      static Heap *createHeap(HeapCrossRef& R) 
     6.1 --- a/lemon/fib_heap.h	Thu Oct 26 13:35:35 2006 +0000
     6.2 +++ b/lemon/fib_heap.h	Thu Oct 26 14:20:17 2006 +0000
     6.3 @@ -43,7 +43,6 @@
     6.4    ///heap. In case of many calls to these operations, it is better to use a
     6.5    ///\e binary \e heap.
     6.6    ///
     6.7 -  ///\param Item Type of the items to be stored.  
     6.8    ///\param Prio Type of the priority of the items.
     6.9    ///\param ItemIntMap A read and writable Item int map, used internally
    6.10    ///to handle the cross references.
    6.11 @@ -55,18 +54,17 @@
    6.12    ///\author Jacint Szabo 
    6.13   
    6.14  #ifdef DOXYGEN
    6.15 -  template <typename Item, 
    6.16 -	    typename Prio, 
    6.17 +  template <typename Prio, 
    6.18  	    typename ItemIntMap, 
    6.19  	    typename Compare>
    6.20  #else
    6.21 -  template <typename Item, 
    6.22 -	    typename Prio, 
    6.23 +  template <typename Prio, 
    6.24  	    typename ItemIntMap, 
    6.25  	    typename Compare = std::less<Prio> >
    6.26  #endif
    6.27    class FibHeap {
    6.28 -  public:     
    6.29 +  public:
    6.30 +    typedef typename ItemIntMap::Key Item;
    6.31      typedef Prio PrioType;
    6.32      
    6.33    private:
    6.34 @@ -271,9 +269,9 @@
    6.35      //  IMPLEMENTATIONS
    6.36      // **********************************************************************
    6.37      
    6.38 -  template <typename Item, typename Prio, typename ItemIntMap, 
    6.39 +  template <typename Prio, typename ItemIntMap, 
    6.40      typename Compare>
    6.41 -  void FibHeap<Item, Prio, ItemIntMap, Compare>::set 
    6.42 +  void FibHeap<Prio, ItemIntMap, Compare>::set 
    6.43    (Item const item, PrioType const value) 
    6.44    {
    6.45      int i=iimap[item];
    6.46 @@ -283,9 +281,9 @@
    6.47      } else push(item, value);
    6.48    }
    6.49      
    6.50 -  template <typename Item, typename Prio, typename ItemIntMap, 
    6.51 +  template <typename Prio, typename ItemIntMap, 
    6.52      typename Compare>
    6.53 -  void FibHeap<Item, Prio, ItemIntMap, Compare>::push 
    6.54 +  void FibHeap<Prio, ItemIntMap, Compare>::push 
    6.55    (Item const item, PrioType const value) {
    6.56        int i=iimap[item];      
    6.57        if ( i < 0 ) {
    6.58 @@ -316,9 +314,9 @@
    6.59        ++num_items;
    6.60      }
    6.61      
    6.62 -  template <typename Item, typename Prio, typename ItemIntMap, 
    6.63 +  template <typename Prio, typename ItemIntMap, 
    6.64      typename Compare>
    6.65 -  void FibHeap<Item, Prio, ItemIntMap, Compare>::pop() {
    6.66 +  void FibHeap<Prio, ItemIntMap, Compare>::pop() {
    6.67        /*The first case is that there are only one root.*/
    6.68        if ( container[minimum].left_neighbor==minimum ) {
    6.69  	container[minimum].in=false;
    6.70 @@ -350,9 +348,9 @@
    6.71      }
    6.72  
    6.73  
    6.74 -  template <typename Item, typename Prio, typename ItemIntMap, 
    6.75 +  template <typename Prio, typename ItemIntMap, 
    6.76      typename Compare>
    6.77 -  void FibHeap<Item, Prio, ItemIntMap, Compare>::erase 
    6.78 +  void FibHeap<Prio, ItemIntMap, Compare>::erase 
    6.79    (const Item& item) {
    6.80        int i=iimap[item];
    6.81        
    6.82 @@ -367,9 +365,9 @@
    6.83        }
    6.84    }
    6.85      
    6.86 -  template <typename Item, typename Prio, typename ItemIntMap, 
    6.87 +  template <typename Prio, typename ItemIntMap, 
    6.88      typename Compare>
    6.89 -  void FibHeap<Item, Prio, ItemIntMap, Compare>::decrease 
    6.90 +  void FibHeap<Prio, ItemIntMap, Compare>::decrease 
    6.91    (Item item, PrioType const value) {
    6.92        int i=iimap[item];
    6.93        container[i].prio=value;
    6.94 @@ -383,9 +381,9 @@
    6.95    }
    6.96   
    6.97  
    6.98 -  template <typename Item, typename Prio, typename ItemIntMap, 
    6.99 +  template <typename Prio, typename ItemIntMap, 
   6.100      typename Compare>
   6.101 -  void FibHeap<Item, Prio, ItemIntMap, Compare>::balance() {      
   6.102 +  void FibHeap<Prio, ItemIntMap, Compare>::balance() {      
   6.103  
   6.104      int maxdeg=int( std::floor( 2.08*log(double(container.size()))))+1;
   6.105    
   6.106 @@ -428,9 +426,9 @@
   6.107         } while ( s != m );
   6.108      }
   6.109  
   6.110 -  template <typename Item, typename Prio, typename ItemIntMap, 
   6.111 +  template <typename Prio, typename ItemIntMap, 
   6.112      typename Compare>
   6.113 -  void FibHeap<Item, Prio, ItemIntMap, Compare>::makeroot 
   6.114 +  void FibHeap<Prio, ItemIntMap, Compare>::makeroot 
   6.115    (int c) {
   6.116        int s=c;
   6.117        do {  
   6.118 @@ -440,9 +438,9 @@
   6.119      }
   6.120    
   6.121    
   6.122 -  template <typename Item, typename Prio, typename ItemIntMap, 
   6.123 +  template <typename Prio, typename ItemIntMap, 
   6.124      typename Compare>
   6.125 -  void FibHeap<Item, Prio, ItemIntMap, Compare>::cut 
   6.126 +  void FibHeap<Prio, ItemIntMap, Compare>::cut 
   6.127    (int a, int b) {    
   6.128      /*
   6.129       *Replacing a from the children of b.
   6.130 @@ -469,9 +467,9 @@
   6.131    }
   6.132    
   6.133  
   6.134 -  template <typename Item, typename Prio, typename ItemIntMap, 
   6.135 +  template <typename Prio, typename ItemIntMap, 
   6.136      typename Compare>
   6.137 -  void FibHeap<Item, Prio, ItemIntMap, Compare>::cascade 
   6.138 +  void FibHeap<Prio, ItemIntMap, Compare>::cascade 
   6.139    (int a) 
   6.140      {
   6.141        if ( container[a].parent!=-1 ) {
   6.142 @@ -486,9 +484,9 @@
   6.143      }
   6.144  
   6.145  
   6.146 -  template <typename Item, typename Prio, typename ItemIntMap, 
   6.147 +  template <typename Prio, typename ItemIntMap, 
   6.148      typename Compare>
   6.149 -  void FibHeap<Item, Prio, ItemIntMap, Compare>::fuse 
   6.150 +  void FibHeap<Prio, ItemIntMap, Compare>::fuse 
   6.151    (int a, int b) {
   6.152        unlace(b);
   6.153        
   6.154 @@ -517,9 +515,9 @@
   6.155    /*
   6.156     *It is invoked only if a has siblings.
   6.157     */
   6.158 -  template <typename Item, typename Prio, typename ItemIntMap, 
   6.159 +  template <typename Prio, typename ItemIntMap, 
   6.160      typename Compare>
   6.161 -  void FibHeap<Item, Prio, ItemIntMap, Compare>::unlace 
   6.162 +  void FibHeap<Prio, ItemIntMap, Compare>::unlace 
   6.163    (int a) {      
   6.164        int leftn=container[a].left_neighbor;
   6.165        int rightn=container[a].right_neighbor;
     7.1 --- a/lemon/fredman_tarjan.h	Thu Oct 26 13:35:35 2006 +0000
     7.2 +++ b/lemon/fredman_tarjan.h	Thu Oct 26 14:20:17 2006 +0000
     7.3 @@ -280,7 +280,7 @@
     7.4        typedef typename SrcGraph::template NodeMap<int> HeapCrossRef;
     7.5        typedef typename SrcGraph::template NodeMap<UEdge> PredMap;
     7.6        HeapCrossRef crossref(graph,-1);
     7.7 -      FibHeap<Node,Value,HeapCrossRef> heap(crossref);
     7.8 +      FibHeap<Value,HeapCrossRef> heap(crossref);
     7.9        PredMap pred(graph,INVALID);
    7.10        int rate=2*edgenum/countNodes(graph);
    7.11        int limit=(rate>std::numeric_limits<int>::digits)?
     8.1 --- a/lemon/johnson.h	Thu Oct 26 13:35:35 2006 +0000
     8.2 +++ b/lemon/johnson.h	Thu Oct 26 14:20:17 2006 +0000
     8.3 @@ -130,7 +130,7 @@
     8.4      ///
     8.5      ///\sa BinHeap
     8.6      ///\sa Dijkstra
     8.7 -    typedef BinHeap<typename Graph::Node, typename LengthMap::Value,
     8.8 +    typedef BinHeap<typename LengthMap::Value,
     8.9  		    HeapCrossRef, std::less<Value> > Heap;
    8.10  
    8.11      ///Instantiates a Heap.
     9.1 --- a/lemon/min_cost_arborescence.h	Thu Oct 26 13:35:35 2006 +0000
     9.2 +++ b/lemon/min_cost_arborescence.h	Thu Oct 26 14:20:17 2006 +0000
     9.3 @@ -224,7 +224,7 @@
     9.4      
     9.5      HeapCrossRef *_heap_cross_ref;
     9.6  
     9.7 -    typedef BinHeap<Node, int, HeapCrossRef> Heap;
     9.8 +    typedef BinHeap<int, HeapCrossRef> Heap;
     9.9  
    9.10      Heap *_heap;
    9.11  
    10.1 --- a/lemon/min_cut.h	Thu Oct 26 13:35:35 2006 +0000
    10.2 +++ b/lemon/min_cut.h	Thu Oct 26 14:20:17 2006 +0000
    10.3 @@ -38,17 +38,17 @@
    10.4  
    10.5      template <typename CapacityMap>
    10.6      struct HeapSelector {
    10.7 -      template <typename Key, typename Value, typename Ref>
    10.8 +      template <typename Value, typename Ref>
    10.9        struct Selector {
   10.10 -        typedef BinHeap<Key, Value, Ref, std::greater<Value> > Heap;
   10.11 +        typedef BinHeap<Value, Ref, std::greater<Value> > Heap;
   10.12        };
   10.13      };
   10.14  
   10.15      template <typename CapacityKey>
   10.16      struct HeapSelector<ConstMap<CapacityKey, Const<int, 1> > > {
   10.17 -      template <typename Key, typename Value, typename Ref>
   10.18 +      template <typename Value, typename Ref>
   10.19        struct Selector {
   10.20 -        typedef BucketHeap<Key, Ref, false > Heap;
   10.21 +        typedef BucketHeap<Ref, false > Heap;
   10.22        };
   10.23      };
   10.24  
   10.25 @@ -99,7 +99,7 @@
   10.26      /// \sa MaxCardinalitySearch
   10.27      typedef typename _min_cut_bits
   10.28      ::HeapSelector<CapacityMap>
   10.29 -    ::template Selector<typename Graph::Node, Value, HeapCrossRef>
   10.30 +    ::template Selector<Value, HeapCrossRef>
   10.31      ::Heap Heap;
   10.32  
   10.33      /// \brief Instantiates a Heap.
   10.34 @@ -766,7 +766,7 @@
   10.35      /// \sa MinCut
   10.36      typedef typename _min_cut_bits
   10.37      ::HeapSelector<CapacityMap>
   10.38 -    ::template Selector<typename AuxGraph::Node, Value, HeapCrossRef>
   10.39 +    ::template Selector<Value, HeapCrossRef>
   10.40      ::Heap Heap;
   10.41      
   10.42      /// \brief Instantiates a Heap.
    11.1 --- a/lemon/prim.h	Thu Oct 26 13:35:35 2006 +0000
    11.2 +++ b/lemon/prim.h	Thu Oct 26 14:20:17 2006 +0000
    11.3 @@ -70,7 +70,7 @@
    11.4      ///
    11.5      ///\sa BinHeap
    11.6      ///\sa Prim
    11.7 -    typedef BinHeap<typename UGraph::Node, typename CM::Value,
    11.8 +    typedef BinHeap<typename CM::Value,
    11.9  		    HeapCrossRef, std::less<Value> > Heap;
   11.10  
   11.11      static Heap *createHeap(HeapCrossRef& _ref){
    12.1 --- a/lemon/radix_heap.h	Thu Oct 26 13:35:35 2006 +0000
    12.2 +++ b/lemon/radix_heap.h	Thu Oct 26 14:20:17 2006 +0000
    12.3 @@ -54,7 +54,6 @@
    12.4    /// item, but the priority cannot be decreased under the last removed 
    12.5    /// item's priority.
    12.6    ///
    12.7 -  /// \param _Item Type of the items to be stored.  
    12.8    /// \param _ItemIntMap A read and writable Item int map, used internally
    12.9    /// to handle the cross references.
   12.10    ///
   12.11 @@ -62,11 +61,11 @@
   12.12    /// \see Dijkstra
   12.13    /// \author Balazs Dezso
   12.14  
   12.15 -  template <typename _Item, typename _ItemIntMap>
   12.16 +  template <typename _ItemIntMap>
   12.17    class RadixHeap {
   12.18  
   12.19    public:
   12.20 -    typedef _Item Item;
   12.21 +    typedef typename _ItemIntMap::Key Item;
   12.22      typedef int Prio;
   12.23      typedef _ItemIntMap ItemIntMap;
   12.24  
   12.25 @@ -299,7 +298,7 @@
   12.26      /// This method returns the item with minimum priority.  
   12.27      /// \pre The heap must be nonempty.  
   12.28      Item top() const {
   12.29 -      const_cast<RadixHeap<Item, ItemIntMap>&>(*this).moveDown();
   12.30 +      const_cast<RadixHeap<ItemIntMap>&>(*this).moveDown();
   12.31        return data[boxes[0].first].item;
   12.32      }
   12.33  
   12.34 @@ -308,7 +307,7 @@
   12.35      /// It returns the minimum priority.
   12.36      /// \pre The heap must be nonempty.
   12.37      Prio prio() const {
   12.38 -      const_cast<RadixHeap<Item, ItemIntMap>&>(*this).moveDown();
   12.39 +      const_cast<RadixHeap<ItemIntMap>&>(*this).moveDown();
   12.40        return data[boxes[0].first].prio;
   12.41       }
   12.42