13 template<
class HashFunction = MixHasher,
class HashProber = LinearProber,
class HashManager = SizeManagerPow2>
19 Meta m(
"lz78trie",
"hash",
"Hash Trie");
30 , m_table(this->
env(),n,remaining_characters)
42 m_table.collect_stats(
env());
51 std::make_pair<squeeze_node_t,factorid_t>(
69 auto parent = parent_w.
id();
78 if(ret.second)
return node_t(newleaf_id,
true);
79 return node_t(ret.first.value(),
false);
82 inline size_t size()
const {
Contains the text compression and encoding framework.
uint8_t uliteral_t
Type to represent signed single literals.
std::pair< Iterator, bool > insert(std::pair< key_t, value_t > &&value)
node_t add_rootnode(uliteral_t c)
HashTrie & operator=(HashTrie &&other)=default
Env & env()
Provides access to the environment that the algorithm works in.
Default return type of find_or_insert.
uint32_t factorid_t
Type for the factor indices, bounded by the number of LZ78 trie nodes.
node_t find_or_insert(const node_t &parent_w, uliteral_t c)
squeeze_node_t create_node(factorid_t id, uliteral_t c)
IF_STATS(MoveGuard m_guard;inline ~HashTrie() { if(m_guard) { m_table.collect_stats(env());} }) HashTrie(HashTrie &&other)=default
float max_load_factor() const noexcept
Local environment for a compression/encoding/decompression call.
Interface for algorithms.
HashTrie(Env &&env, const size_t n, const size_t &remaining_characters, factorid_t reserve=0)
node_t get_rootnode(uliteral_t c) const