Class DirectAccessCodes

Nested Relationships

Nested Types

Class Documentation

class DirectAccessCodes

a static sequence of integers of variable length with direct access

Public Types

using value_type = std::uint64_t
using size_type = std::size_t
using difference_type = std::ptrdiff_t
using reference = std::uint64_t
using const_reference = std::uint64_t
using const_iterator = SubscriptIterator<DirectAccessCodes, std::uint64_t>
using iterator = const_iterator

Public Functions

DirectAccessCodes(void) = default
explicit DirectAccessCodes(std::span<const std::uint64_t> x)

the sequence x, with the widths of the levels that minimize its bits

DirectAccessCodes(std::span<const std::uint64_t> x, int b)

the sequence x, with levels of b bits each (the last one up to the bits of the largest item), which trades bits for fewer levels

Pre:

1 <= b <= 64

inline std::size_t size(void) const
inline bool empty(void) const
std::uint64_t access(std::size_t i) const

the item i

Pre:

i < size()

inline std::uint64_t operator[](std::size_t i) const
std::vector<int> widths(void) const

the widths of the chunks of the levels

std::size_t sizeInBits(void) const

the bits of the chunks, of the continuation bits and of their ranks

inline const_iterator begin(void) const
inline const_iterator end(void) const
inline const_iterator cbegin(void) const
inline const_iterator cend(void) const