Ranked set

Back to Data structures

A ranked set is a data structure for storing and manipulating the smallest stored elements.

Types

Generic data structure
RankedSet

Properties

The ranked set implementation in Pastel has the following properties:

Task / Property Complexity
Insert an element.
Remove the maximum element.
Find out the maximum element.
Find out the number of elements in a set.

Versus std::priority_queue

The ranked-set is a bounded priority-queue. The main difference is that the ranked-set potentially removes an existing element on insertion, if the size already equals capacity.

Files

Ranked set