Class LazyPQ

Class Documentation

class LazyPQ

The idea behind this class is to create a structure similar to a priority queue that allows elements to be removed from the middle of the queue as well, rather than just the top.

Public Functions

void clear()

Clear the LazyPQ.

Return
void

void insert(const NodeKeyPair &t)

Insert into the LazyPQ.

Return
void

void pop()

pop the top element from the LazyPQ

Return
void

const NodeKeyPair &top() const

Returns the top element of the LazyPQ.

Return
reference to the top value in the LazyPQ

size_t size() const

Number of elements in the LazyPQ.

Return
void

bool empty() const

Checks whether the LazyPQ is empty.

Return
bool whether the LazyPQ is empty

bool isElementInStruct(const NodeKeyPair &t) const

Checks whether the element is in the LazyPQ.

Return
bool whether the element is in the LazyPQ

void remove(const NodeKeyPair &t)

Remove an element from the LazyPQ if it exists.

Return
void