lemon/min_cut.h
changeset 2263 9273fe7d850c
parent 2260 4274224f8a7d
equal deleted inserted replaced
12:48bc04a4588d 13:6dfe58cc9858
    36 
    36 
    37   namespace _min_cut_bits {
    37   namespace _min_cut_bits {
    38 
    38 
    39     template <typename CapacityMap>
    39     template <typename CapacityMap>
    40     struct HeapSelector {
    40     struct HeapSelector {
    41       template <typename Key, typename Value, typename Ref>
    41       template <typename Value, typename Ref>
    42       struct Selector {
    42       struct Selector {
    43         typedef BinHeap<Key, Value, Ref, std::greater<Value> > Heap;
    43         typedef BinHeap<Value, Ref, std::greater<Value> > Heap;
    44       };
    44       };
    45     };
    45     };
    46 
    46 
    47     template <typename CapacityKey>
    47     template <typename CapacityKey>
    48     struct HeapSelector<ConstMap<CapacityKey, Const<int, 1> > > {
    48     struct HeapSelector<ConstMap<CapacityKey, Const<int, 1> > > {
    49       template <typename Key, typename Value, typename Ref>
    49       template <typename Value, typename Ref>
    50       struct Selector {
    50       struct Selector {
    51         typedef BucketHeap<Key, Ref, false > Heap;
    51         typedef BucketHeap<Ref, false > Heap;
    52       };
    52       };
    53     };
    53     };
    54 
    54 
    55   }
    55   }
    56 
    56 
    97     /// to BucketHeap.
    97     /// to BucketHeap.
    98     ///
    98     ///
    99     /// \sa MaxCardinalitySearch
    99     /// \sa MaxCardinalitySearch
   100     typedef typename _min_cut_bits
   100     typedef typename _min_cut_bits
   101     ::HeapSelector<CapacityMap>
   101     ::HeapSelector<CapacityMap>
   102     ::template Selector<typename Graph::Node, Value, HeapCrossRef>
   102     ::template Selector<Value, HeapCrossRef>
   103     ::Heap Heap;
   103     ::Heap Heap;
   104 
   104 
   105     /// \brief Instantiates a Heap.
   105     /// \brief Instantiates a Heap.
   106     ///
   106     ///
   107     /// This function instantiates a \ref Heap. 
   107     /// This function instantiates a \ref Heap. 
   764     ///
   764     ///
   765     /// \sa BinHeap
   765     /// \sa BinHeap
   766     /// \sa MinCut
   766     /// \sa MinCut
   767     typedef typename _min_cut_bits
   767     typedef typename _min_cut_bits
   768     ::HeapSelector<CapacityMap>
   768     ::HeapSelector<CapacityMap>
   769     ::template Selector<typename AuxGraph::Node, Value, HeapCrossRef>
   769     ::template Selector<Value, HeapCrossRef>
   770     ::Heap Heap;
   770     ::Heap Heap;
   771     
   771     
   772     /// \brief Instantiates a Heap.
   772     /// \brief Instantiates a Heap.
   773     ///
   773     ///
   774     /// This function instantiates a \ref Heap. 
   774     /// This function instantiates a \ref Heap.