Template Class AdaptiveRadixTree

Nested Relationships

Nested Types

Class Documentation

template<class V>
class AdaptiveRadixTree

an ordered map from strings to values of type V on an adaptive radix tree

Public Types

using Key = std::string

the type of the keys

using Value = V

the type of the values

using value_type = std::pair<std::string_view, const V&>
using size_type = std::size_t
using difference_type = std::ptrdiff_t
using reference = value_type
using const_reference = value_type
using iterator = const_iterator

Public Functions

AdaptiveRadixTree(void) = default
AdaptiveRadixTree(const AdaptiveRadixTree &o)
AdaptiveRadixTree(AdaptiveRadixTree &&o) noexcept
AdaptiveRadixTree &operator=(AdaptiveRadixTree o) noexcept
~AdaptiveRadixTree()
std::optional<V> lookup(std::string_view k) const

the value of k, if there

const V *find(std::string_view k) const

the value of k, to change in place, or nullptr

V *find(std::string_view k)
bool insert(std::string_view k, const V &v)

gives k the value v; true if k was not there

bool remove(std::string_view k)

removes k; true if it was there

bool contains(std::string_view k) const
std::size_t size(void) const
bool empty(void) const
void clear(void)
void swap(AdaptiveRadixTree &o) noexcept
template<class F>
void forEach(F &&f) const

f( key , value ) on each pair, by increasing keys

template<class F>
void forPrefix(std::string_view p, F &&f) const

f( key , value ) on each pair whose key begins with p, by increasing keys

std::vector<std::string> keysWithPrefix(std::string_view p) const

the keys that begin with p, in increasing order

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

Public Types

using value_type = std::pair<std::string_view, const V&>
using reference = value_type
using difference_type = std::ptrdiff_t
using iterator_concept = std::forward_iterator_tag
using iterator_category = std::input_iterator_tag

Public Functions

const_iterator(void) = default
inline reference operator*(void) const
inline const_iterator &operator++(void)
inline const_iterator operator++(int)
inline bool operator==(const const_iterator &o) const