X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=src%2Flibswift_udp%2Fbinheap.h;fp=src%2Flibswift_udp%2Fbinheap.h;h=eaba92ab0b1b150d914f7bbecd27764f42e19ad0;hb=46f3ca346fe499ba3e8f595fc5c2aa2b3e3c4d5f;hp=0000000000000000000000000000000000000000;hpb=d8da6fc1273a2acee935a15761b77a73424faef5;p=swifty.git diff --git a/src/libswift_udp/binheap.h b/src/libswift_udp/binheap.h new file mode 100644 index 0000000..eaba92a --- /dev/null +++ b/src/libswift_udp/binheap.h @@ -0,0 +1,28 @@ +/* + * sbit.cpp + * binmap, a hybrid of bitmap and binary tree + * + * Created by Victor Grishchenko on 3/28/09. + * Copyright 2009 Delft University of Technology. All rights reserved. + * + */ +#ifndef BINS_H +#define BINS_H + +#include "bin.h" +#include "compat.h" + +class binheap { + bin_t *heap_; + uint32_t filled_; + uint32_t size_; +public: + binheap(); + bin_t pop(); + void push(bin_t); + bool empty() const { return !filled_; } + void extend(); + ~binheap(); +}; + +#endif