Changes in / [687:fb93895f84d9:685:a27356ceb5bd] in lemon-main
- Files:
-
- 3 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/Makefile.am
r686 r667 60 60 lemon/bfs.h \ 61 61 lemon/bin_heap.h \ 62 lemon/bucket_heap.h \63 62 lemon/cbc.h \ 64 63 lemon/circulation.h \ … … 78 77 lemon/error.h \ 79 78 lemon/euler.h \ 80 lemon/fib_heap.h \81 79 lemon/full_graph.h \ 82 80 lemon/glpk.h \ … … 93 91 lemon/lp_base.h \ 94 92 lemon/lp_skeleton.h \ 93 lemon/list_graph.h \ 95 94 lemon/maps.h \ 96 95 lemon/matching.h \ … … 101 100 lemon/path.h \ 102 101 lemon/preflow.h \ 103 lemon/radix_heap.h \104 102 lemon/radix_sort.h \ 105 103 lemon/random.h \ -
lemon/bin_heap.h
r683 r584 34 34 ///\brief A Binary Heap implementation. 35 35 /// 36 ///This class implements the \e binary \e heap data structure. 37 /// 36 ///This class implements the \e binary \e heap data structure. 37 /// 38 38 ///A \e heap is a data structure for storing items with specified values 39 39 ///called \e priorities in such a way that finding the item with minimum 40 ///priority is efficient. \c C MPspecifies the ordering of the priorities.40 ///priority is efficient. \c Comp specifies the ordering of the priorities. 41 41 ///In a heap one can change the priority of an item, add or erase an 42 42 ///item, etc. … … 45 45 ///\tparam IM A read and writable item map with int values, used internally 46 46 ///to handle the cross references. 47 ///\tparam C MPA functor class for the ordering of the priorities.47 ///\tparam Comp A functor class for the ordering of the priorities. 48 48 ///The default is \c std::less<PR>. 49 49 /// 50 50 ///\sa FibHeap 51 51 ///\sa Dijkstra 52 template <typename PR, typename IM, typename C MP= std::less<PR> >52 template <typename PR, typename IM, typename Comp = std::less<PR> > 53 53 class BinHeap { 54 54 … … 63 63 typedef std::pair<Item,Prio> Pair; 64 64 ///\e 65 typedef C MPCompare;65 typedef Comp Compare; 66 66 67 67 /// \brief Type to represent the items states. -
test/heap_test.cc
r681 r440 32 32 33 33 #include <lemon/bin_heap.h> 34 #include <lemon/fib_heap.h>35 #include <lemon/radix_heap.h>36 #include <lemon/bucket_heap.h>37 34 38 35 #include "test_tools.h" … … 187 184 } 188 185 189 {190 typedef FibHeap<Prio, ItemIntMap> IntHeap;191 checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();192 heapSortTest<IntHeap>();193 heapIncreaseTest<IntHeap>();194 195 typedef FibHeap<Prio, IntNodeMap > NodeHeap;196 checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();197 dijkstraHeapTest<NodeHeap>(digraph, length, source);198 }199 200 {201 typedef RadixHeap<ItemIntMap> IntHeap;202 checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();203 heapSortTest<IntHeap>();204 heapIncreaseTest<IntHeap>();205 206 typedef RadixHeap<IntNodeMap > NodeHeap;207 checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();208 dijkstraHeapTest<NodeHeap>(digraph, length, source);209 }210 211 {212 typedef BucketHeap<ItemIntMap> IntHeap;213 checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();214 heapSortTest<IntHeap>();215 heapIncreaseTest<IntHeap>();216 217 typedef BucketHeap<IntNodeMap > NodeHeap;218 checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();219 dijkstraHeapTest<NodeHeap>(digraph, length, source);220 }221 222 223 186 return 0; 224 187 }
Note: See TracChangeset
for help on using the changeset viewer.