Ticket #13119: main.cpp
| File main.cpp, 453 bytes (added by , 5 years ago) |
|---|
| Line | |
|---|---|
| 1 | #include "boost/heap/binomial_heap.hpp" |
| 2 | typedef boost::heap::binomial_heap<int> Heap; |
| 3 | |
| 4 | int main(int /*argc*/, char* /*argv*/[]) { |
| 5 | Heap heap0; |
| 6 | size_t heap0_size = 5; |
| 7 | size_t max_range = 100; |
| 8 | for (size_t ix = 0; ix < heap0_size; ++ix) { |
| 9 | heap0.push(rand() % max_range); |
| 10 | } |
| 11 | |
| 12 | Heap heap1; |
| 13 | size_t heap1_size = 9; |
| 14 | for (size_t ix = 0; ix < heap1_size; ++ix) { |
| 15 | heap1.push(rand() % max_range); |
| 16 | } |
| 17 | heap0.merge(heap1); |
| 18 | |
| 19 | } |
