Class TwoLevelDictionary
Defined in File TwoLevelDictionary.h
Class Documentation
-
class TwoLevelDictionary
a Patricia trie on the anchors of a front-coded dictionary
Public Types
-
using value_type = std::string
-
using size_type = std::size_t
-
using difference_type = std::ptrdiff_t
-
using reference = const std::string&
-
using const_reference = const std::string&
-
using const_iterator = FrontCodedDictionary::const_iterator
-
using iterator = const_iterator
Public Functions
-
explicit TwoLevelDictionary(FrontCodedDictionary F)
the trie on the anchors of the coding F
-
std::size_t lexicographicPosition(std::string_view Q) const
the number of strings smaller than Q
-
std::size_t prefixEnd(std::string_view P) const
the number of strings smaller than P#
-
std::pair<std::size_t, std::size_t> prefixRange(std::string_view P) const
the range [ l , r ) of the strings prefixed by P
-
std::size_t size(void) const
-
const PatriciaTrie &upper(void) const
-
const FrontCodedDictionary &lower(void) const
-
inline const_iterator begin(void) const
-
inline const_iterator end(void) const
-
inline const_iterator cbegin(void) const
-
inline const_iterator cend(void) const
-
using value_type = std::string