X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=src%2Flibswift%2Fbinheap.h;fp=src%2Flibswift%2Fbinheap.h;h=eaba92ab0b1b150d914f7bbecd27764f42e19ad0;hb=45963a7511531cd1656ad5d3847d2dafd015c54d;hp=0000000000000000000000000000000000000000;hpb=d069796805ad79542fd7e4406d1e9c6d2d8c2ef7;p=swifty.git diff --git a/src/libswift/binheap.h b/src/libswift/binheap.h new file mode 100644 index 0000000..eaba92a --- /dev/null +++ b/src/libswift/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