tudocomp
– The TU Dortmund Compression Framework
tdc::lz78::HashTriePlus< HashFunction, HashManager > Class Template Reference

#include <HashTriePlus.hpp>

Inheritance diagram for tdc::lz78::HashTriePlus< HashFunction, HashManager >:
tdc::Algorithm tdc::lz78::LZ78Trie<>

Public Member Functions

 HashTriePlus (Env &&env, const size_t n, const size_t &remaining_characters, factorid_t reserve=0)
 
 IF_STATS (MoveGuard m_guard;inline ~HashTriePlus() { if(m_guard) { if(m_table2.empty()) { m_table.collect_stats(env());} else { m_table2.collect_stats(env());} } }) HashTriePlus(HashTriePlus &&other)=default
 
HashTriePlusoperator= (HashTriePlus &&other)=default
 
node_t add_rootnode (uliteral_t c)
 
node_t get_rootnode (uliteral_t c) const
 
void clear ()
 
node_t find_or_insert (const node_t &parent_w, uliteral_t c)
 
size_t size () const
 
- Public Member Functions inherited from tdc::Algorithm
virtual ~Algorithm ()=default
 
 Algorithm (Algorithm const &)=default
 
 Algorithm (Algorithm &&)=default
 
Algorithmoperator= (Algorithm const &)=default
 
Algorithmoperator= (Algorithm &&)=default
 
 Algorithm (Env &&env)
 Instantiates an algorithm in the specified environment. More...
 
Envenv ()
 Provides access to the environment that the algorithm works in. More...
 
const Envenv () const
 

Static Public Member Functions

static Meta meta ()
 

Additional Inherited Members

- Public Types inherited from tdc::lz78::LZ78Trie<>
using node_t = LZ78TrieNode
 
- Protected Member Functions inherited from tdc::lz78::LZ78Trie<>
 LZ78Trie (const size_t n, const size_t &remaining_characters)
 
size_t expected_number_of_remaining_elements (const size_t z) const
 
node_t add_rootnode (uliteral_t c)
 The dictionary can store multiple root nodes For LZ78, we use a root node with the id = c = 0. More...
 
node_t get_rootnode (uliteral_t c) const
 Returns the root node corresponding to literal c. More...
 
void clear ()
 Erases the contents of the dictionary. More...
 
node_t find_or_insert (const node_t &parent, uliteral_t c)
 Searches a pair (parent, c). More...
 
size_t size () const
 Returns the number of entries, plus the number of rootnodes. More...
 

Detailed Description

template<class HashFunction = MixHasher, class HashManager = SizeManagerDirect>
class tdc::lz78::HashTriePlus< HashFunction, HashManager >

Definition at line 13 of file HashTriePlus.hpp.

Constructor & Destructor Documentation

◆ HashTriePlus()

template<class HashFunction = MixHasher, class HashManager = SizeManagerDirect>
tdc::lz78::HashTriePlus< HashFunction, HashManager >::HashTriePlus ( Env &&  env,
const size_t  n,
const size_t &  remaining_characters,
factorid_t  reserve = 0 
)
inline

Definition at line 26 of file HashTriePlus.hpp.

Member Function Documentation

◆ add_rootnode()

template<class HashFunction = MixHasher, class HashManager = SizeManagerDirect>
node_t tdc::lz78::HashTriePlus< HashFunction, HashManager >::add_rootnode ( uliteral_t  c)
inline

Definition at line 54 of file HashTriePlus.hpp.

◆ clear()

template<class HashFunction = MixHasher, class HashManager = SizeManagerDirect>
void tdc::lz78::HashTriePlus< HashFunction, HashManager >::clear ( )
inline

Definition at line 64 of file HashTriePlus.hpp.

◆ find_or_insert()

template<class HashFunction = MixHasher, class HashManager = SizeManagerDirect>
node_t tdc::lz78::HashTriePlus< HashFunction, HashManager >::find_or_insert ( const node_t parent_w,
uliteral_t  c 
)
inline

if we add a new node, its index will be equal to the current size of the dictionary

Definition at line 69 of file HashTriePlus.hpp.

◆ get_rootnode()

template<class HashFunction = MixHasher, class HashManager = SizeManagerDirect>
node_t tdc::lz78::HashTriePlus< HashFunction, HashManager >::get_rootnode ( uliteral_t  c) const
inline

Definition at line 60 of file HashTriePlus.hpp.

◆ IF_STATS()

template<class HashFunction = MixHasher, class HashManager = SizeManagerDirect>
tdc::lz78::HashTriePlus< HashFunction, HashManager >::IF_STATS ( MoveGuard m_guard;inline ~HashTriePlus< HashFunction, HashManager >() { if(m_guard) { if(m_table2.empty()) { m_table.collect_stats(env());} else { m_table2.collect_stats(env());} } }  ) &&
default

◆ meta()

template<class HashFunction = MixHasher, class HashManager = SizeManagerDirect>
static Meta tdc::lz78::HashTriePlus< HashFunction, HashManager >::meta ( )
inlinestatic

Definition at line 18 of file HashTriePlus.hpp.

◆ operator=()

template<class HashFunction = MixHasher, class HashManager = SizeManagerDirect>
HashTriePlus& tdc::lz78::HashTriePlus< HashFunction, HashManager >::operator= ( HashTriePlus< HashFunction, HashManager > &&  other)
default

◆ size()

template<class HashFunction = MixHasher, class HashManager = SizeManagerDirect>
size_t tdc::lz78::HashTriePlus< HashFunction, HashManager >::size ( ) const
inline

Definition at line 94 of file HashTriePlus.hpp.


The documentation for this class was generated from the following file: