libime
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
libime::DATriePrivate< V, ORDERED, MAX_TRIAL > Class Template Reference
Collaboration diagram for libime::DATriePrivate< V, ORDERED, MAX_TRIAL >:
Collaboration graph
[legend]

Classes

struct  block
 
struct  ninfo
 
struct  node
 
struct  npos_t
 

Public Types

using base_type = DATrie< V >
 
using value_type = typename base_type::value_type
 
using position_type = typename base_type::position_type
 
using updater_type = typename base_type::updater_type
 
using callback_type = typename base_type::callback_type
 
using decoder_type = DecoderUnion< V >
 
using result_type = value_type
 
using uchar = uint8_t
 

Public Member Functions

size_t size () const
 
size_t capacity () const
 
void clear ()
 
size_t num_keys () const
 
void open (std::istream &fin)
 
void save (std::ostream &fout)
 
void init ()
 
void suffix (std::string &key, size_t len, npos_t pos) const
 
template<typename U >
void update (const char *key, const U &callback)
 
template<typename U >
void update (const char *key, size_t len, const U &callback)
 
template<typename U >
void update (const char *key, npos_t &from, size_t &pos, size_t len, const U &callback)
 
template<typename U , typename T >
void update (const char *key, npos_t &npos, size_t &pos, size_t len, const U &callback, const T &cf)
 
int erase (const char *key)
 
int erase (const char *key, size_t len, npos_t npos=npos_t())
 
bool foreach (const callback_type &callback, npos_t root=npos_t()) const
 
template<typename T >
void dump (T *result, const size_t result_len) const
 
void shrink_tail ()
 
int32_t begin (npos_t &npos, size_t &len) const
 
int32_t next (npos_t &npos, size_t &len, const npos_t root=npos_t()) const
 
template<typename T >
int _follow (uint32_t &from, const uchar label, const T &cf)
 
int32_t _find (const char *key, npos_t &npos, size_t &pos, const size_t len) const
 
int _find_place ()
 
int _find_place (const uchar *const first, const uchar *const last)
 
void _pop_block (const int bi, int &head_in, const bool last)
 
void _push_block (const int bi, int &head_out, const bool empty)
 
int _add_block ()
 
void _transfer_block (const int bi, int &head_in, int &head_out)
 
int _pop_enode (const int base, const uchar label, const int from)
 
void _push_enode (const int e)
 
void _push_sibling (const int32_t from, const int base, const uchar label, const bool flag=true)
 
void _pop_sibling (const int32_t from, const int base, const uchar label)
 
bool _consult (const int base_n, const int base_p, uchar c_n, uchar c_p) const
 
uchar * _set_child (uchar *p, const int base, uchar c, const std::optional< uchar > label=std::nullopt)
 
template<typename T >
int _resolve (uint32_t &from_n, const int base_n, const uchar label_n, const T &cf)
 

Static Public Member Functions

static void _set_result (result_type *x, value_type r, size_t=0, npos_t=npos_t())
 
static void _set_result (std::tuple< value_type, size_t, position_type > *x, value_type r, size_t len, npos_t npos)
 

Public Attributes

vector_impl< nodem_array
 
vector_impl< char > m_tail
 
vector_impl< int > m_tail0
 
vector_impl< blockm_block
 
vector_impl< ninfom_ninfo
 
int32_t m_bheadF
 
int32_t m_bheadC
 
int32_t m_bheadO
 
std::array< int, 257 > m_reject
 

Static Public Attributes

static const int32_t CEDAR_NO_VALUE = NanValue<V>::NO_VALUE()
 
static const int32_t CEDAR_NO_PATH = NanValue<V>::NO_PATH()
 
static constexpr size_t MAX_ALLOC_SIZE
 

Detailed Description

template<typename V, bool ORDERED, int MAX_TRIAL>
class libime::DATriePrivate< V, ORDERED, MAX_TRIAL >

Definition at line 97 of file datrie.cpp.

Member Data Documentation

◆ MAX_ALLOC_SIZE

template<typename V, bool ORDERED, int MAX_TRIAL>
constexpr size_t libime::DATriePrivate< V, ORDERED, MAX_TRIAL >::MAX_ALLOC_SIZE
static
Initial value:
= 1
<< 16

Definition at line 109 of file datrie.cpp.


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