diff options
author | Mike Buland <eichlan@xagasoft.com> | 2008-02-19 19:30:09 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2008-02-19 19:30:09 +0000 |
commit | 62287ea894a1587553f017d0f6a09d4c87ad3b1f (patch) | |
tree | 154c6fbb6b3ef39c82809b6c3e3edaab8af71dbd /src/heap.cpp | |
parent | e2a10c7b77b03bacf4d8b8dcf08f8f8f47628314 (diff) | |
download | libbu++-62287ea894a1587553f017d0f6a09d4c87ad3b1f.tar.gz libbu++-62287ea894a1587553f017d0f6a09d4c87ad3b1f.tar.bz2 libbu++-62287ea894a1587553f017d0f6a09d4c87ad3b1f.tar.xz libbu++-62287ea894a1587553f017d0f6a09d4c87ad3b1f.zip |
I believe this will do the trick. The Bu::Heap class now uses the appropriate
allocators for all work, every data type used in a Bu::Heap must support the
equals operator and <= or >=, or you need to write your own comparison functor.
The heap works as both a min-heap and max-heap, just change out the functor used
for camparison, kinda' cool.
The print function I'll leave in for a little while, but not in the long run, it
just prints a dot graph to stdout.
Next up, the Ito version.
Diffstat (limited to '')
-rw-r--r-- | src/heap.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/heap.cpp b/src/heap.cpp index 00a5d5d..01a5f50 100644 --- a/src/heap.cpp +++ b/src/heap.cpp | |||
@@ -7,3 +7,4 @@ | |||
7 | 7 | ||
8 | #include "heap.h" | 8 | #include "heap.h" |
9 | 9 | ||
10 | namespace Bu { subExceptionDef( HeapException ) } | ||