tudocomp
– The TU Dortmund Compression Framework
|
#include <RollingTriePlus.hpp>
Public Member Functions | |
RollingTriePlus (Env &&env, const size_t n, const size_t &remaining_characters, factorid_t reserve=0) | |
IF_STATS (MoveGuard m_guard;inline ~RollingTriePlus() { if(m_guard) { if(m_table2.empty()) { m_table.collect_stats(env());} else { m_table2.collect_stats(env());} } }) RollingTriePlus(RollingTriePlus &&other)=default | |
RollingTriePlus & | operator= (RollingTriePlus &&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 &, uliteral_t c) |
factorid_t | size () const |
Public Member Functions inherited from tdc::Algorithm | |
virtual | ~Algorithm ()=default |
Algorithm (Algorithm const &)=default | |
Algorithm (Algorithm &&)=default | |
Algorithm & | operator= (Algorithm const &)=default |
Algorithm & | operator= (Algorithm &&)=default |
Algorithm (Env &&env) | |
Instantiates an algorithm in the specified environment. More... | |
Env & | env () |
Provides access to the environment that the algorithm works in. More... | |
const Env & | env () 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... | |
Definition at line 16 of file RollingTriePlus.hpp.
|
inline |
Definition at line 36 of file RollingTriePlus.hpp.
|
inline |
Definition at line 65 of file RollingTriePlus.hpp.
|
inline |
Definition at line 76 of file RollingTriePlus.hpp.
|
inline |
if we add a new node, its index will be equal to the current size of the dictionary
Definition at line 80 of file RollingTriePlus.hpp.
|
inline |
Definition at line 71 of file RollingTriePlus.hpp.
|
default |
|
inlinestatic |
Definition at line 28 of file RollingTriePlus.hpp.
|
default |
|
inline |
Definition at line 112 of file RollingTriePlus.hpp.