Template Class StreamHeap

Class Documentation

template<class T>
class StreamHeap

Stream Heap implementation.

Dynamic Heap implementation, max frequency values on top

tparam Type

of the elements of the Heap

Public Functions

inline StreamHeap()

Contructor

inline StreamHeap(size_t heapSize)

Contructor

Parameters

heapSize – Max size of the heap

inline ~StreamHeap()

Destructor

StreamHeap(StreamHeap const &x) = delete

Disable copy constructor

Parameters

x

void operator=(StreamHeap const &x) = delete

Disable copy assignment

Parameters

x

inline void insertElement(T value)

Insert a new element in the Heap and reorder

Parameters

value – New heap value

inline T getTop() const

Returns heap top value (Max frequency)

Returns

T Heap Top value

inline void clear()

Clear Heap values