diff options
author | Mike Buland <eichlan@xagasoft.com> | 2008-02-20 08:07:31 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2008-02-20 08:07:31 +0000 |
commit | 3cea09281c9f809fc78de6f2e79f4117976f74e4 (patch) | |
tree | 7dccb751019a38bf93bffce61e5683d72a1fe842 /src/heap.h | |
parent | a4c22303b1044eee5ccbf0766895a879a8f4810e (diff) | |
download | libbu++-3cea09281c9f809fc78de6f2e79f4117976f74e4.tar.gz libbu++-3cea09281c9f809fc78de6f2e79f4117976f74e4.tar.bz2 libbu++-3cea09281c9f809fc78de6f2e79f4117976f74e4.tar.xz libbu++-3cea09281c9f809fc78de6f2e79f4117976f74e4.zip |
Applied an update from Hash to Set (they're basically the same logic/code, in
fact, I need to get in there and change all the comments and exceptions in Set
to refer to Set and not Hash). Util has the functors in it that are shared now,
and List actually uses those functors for it's insertSorted function, that thing
has come in so handy.
Diffstat (limited to 'src/heap.h')
-rw-r--r-- | src/heap.h | 36 |
1 files changed, 0 insertions, 36 deletions
@@ -19,42 +19,6 @@ namespace Bu | |||
19 | { | 19 | { |
20 | subExceptionDecl( HeapException ); | 20 | subExceptionDecl( HeapException ); |
21 | 21 | ||
22 | template<typename item> | ||
23 | struct __basicLTCmp | ||
24 | { | ||
25 | bool operator()( const item &a, const item &b ) | ||
26 | { | ||
27 | return a < b; | ||
28 | } | ||
29 | }; | ||
30 | |||
31 | template<typename item> | ||
32 | struct __basicGTCmp | ||
33 | { | ||
34 | bool operator()( const item &a, const item &b ) | ||
35 | { | ||
36 | return a > b; | ||
37 | } | ||
38 | }; | ||
39 | |||
40 | template<typename item> | ||
41 | struct __basicPtrLTCmp | ||
42 | { | ||
43 | bool operator()( const item &a, const item &b ) | ||
44 | { | ||
45 | return *a < *b; | ||
46 | } | ||
47 | }; | ||
48 | |||
49 | template<typename item> | ||
50 | struct __basicPtrGTCmp | ||
51 | { | ||
52 | bool operator()( const item &a, const item &b ) | ||
53 | { | ||
54 | return *a > *b; | ||
55 | } | ||
56 | }; | ||
57 | |||
58 | template<typename item, typename cmpfunc=__basicLTCmp<item>, typename itemalloc=std::allocator<item> > | 22 | template<typename item, typename cmpfunc=__basicLTCmp<item>, typename itemalloc=std::allocator<item> > |
59 | class Heap | 23 | class Heap |
60 | { | 24 | { |