tudocomp
– The TU Dortmund Compression Framework
tdc::lz78::CedarTrie Class Reference

#include <CedarTrie.hpp>

Inheritance diagram for tdc::lz78::CedarTrie:
tdc::Algorithm tdc::lz78::LZ78Trie< cedar::CedarTrieNode >

Public Member Functions

 CedarTrie (Env &&env, const size_t n, const size_t &remaining_characters, factorid_t=0)
 
node_t add_rootnode (const uliteral_t c)
 
node_t get_rootnode (uliteral_t c) const
 
void clear ()
 
node_t find_or_insert (const node_t &parent, uliteral_t c)
 
size_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< cedar::CedarTrieNode >
using node_t = cedar::CedarTrieNode
 
- Protected Member Functions inherited from tdc::lz78::LZ78Trie< cedar::CedarTrieNode >
 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

Definition at line 25 of file CedarTrie.hpp.

Constructor & Destructor Documentation

◆ CedarTrie()

tdc::lz78::CedarTrie::CedarTrie ( Env &&  env,
const size_t  n,
const size_t &  remaining_characters,
factorid_t  = 0 
)
inline

Definition at line 175 of file CedarTrie.hpp.

Member Function Documentation

◆ add_rootnode()

node_t tdc::lz78::CedarTrie::add_rootnode ( const uliteral_t  c)
inline

Definition at line 180 of file CedarTrie.hpp.

◆ clear()

void tdc::lz78::CedarTrie::clear ( )
inline

Definition at line 237 of file CedarTrie.hpp.

◆ find_or_insert()

node_t tdc::lz78::CedarTrie::find_or_insert ( const node_t &  parent,
uliteral_t  c 
)
inline

Definition at line 245 of file CedarTrie.hpp.

◆ get_rootnode()

node_t tdc::lz78::CedarTrie::get_rootnode ( uliteral_t  c) const
inline

Definition at line 233 of file CedarTrie.hpp.

◆ meta()

static Meta tdc::lz78::CedarTrie::meta ( )
inlinestatic

Definition at line 170 of file CedarTrie.hpp.

◆ size()

size_t tdc::lz78::CedarTrie::size ( ) const
inline

Definition at line 269 of file CedarTrie.hpp.


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