Class SortedList

Class Documentation

class SortedList

Public Functions

inline SortedList(uint64_t size, uint64_t maxKey)

Creates a SortedList of size size accepting key values from 0 to maxKey.

inline void insert(uint64_t newElement, double newValue)

Insert a key-value element.

inline double getValue(const uint64_t i) const

Returns the value at position i in the ranking.

inline uint64_t getElement(const uint64_t i) const

Returns the element at position i in the ranking.

inline uint64_t getSize() const

Returns the number of elements stored in the list.

inline void clear()

Removes all the elements in the list.