47#ifndef GUM_LEARNING_DB_TRANSLATOR_4_LABELIZED_VARIABLE_H
48#define GUM_LEARNING_DB_TRANSLATOR_4_LABELIZED_VARIABLE_H
176 std::size_t max_dico_entries
177 = std::numeric_limits< std::size_t >::max());
190 = std::numeric_limits< std::size_t >::max());
210 const std::vector< std::string >& missing_symbols,
211 const bool editable_dictionary =
false,
212 std::size_t max_dico_entries
213 = std::numeric_limits< std::size_t >::max());
233 const bool editable_dictionary =
false,
234 std::size_t max_dico_entries
235 = std::numeric_limits< std::size_t >::max());
362#ifndef DOXYGEN_SHOULD_SKIP_THIS
The class representing the original values of the cells of databases.
The databases' cell translators for labelized variables.
The base class for all the tabular databases' cell translators.
The class for generic Hash Tables.
DBTranslator4LabelizedVariable(const DBTranslator4LabelizedVariable &from)
copy constructor
DBTranslator4LabelizedVariable(DBTranslator4LabelizedVariable &&from)
move constructor
std::size_t domainSize() const final
returns the domain size of a variable corresponding to the translations
DBTranslator4LabelizedVariable(std::size_t max_dico_entries=std::numeric_limits< std::size_t >::max())
default constructor without any initial variable nor missing symbols
std::string translateBack(const DBTranslatedValue translated_val) const final
returns the original value for a given translation
DBTranslator4LabelizedVariable * clone() const override
virtual copy constructor
DBTranslatedValue missingValue() const final
returns the translation of a missing value
DBTranslator4LabelizedVariable(const LabelizedVariable &var, const std::vector< std::string > &missing_symbols, const bool editable_dictionary=false, std::size_t max_dico_entries=std::numeric_limits< std::size_t >::max())
default constructor with a labelized variable as translator
HashTable< std::size_t, std::size_t > reorder() final
performs a reordering of the dictionary and returns a mapping from the old translated values to the n...
~DBTranslator4LabelizedVariable() override
destructor
DBTranslator4LabelizedVariable(const LabelizedVariable &var, const bool editable_dictionary=false, std::size_t max_dico_entries=std::numeric_limits< std::size_t >::max())
default constructor with a labelized variable as translator but without missing symbols
const LabelizedVariable * variable() const final
returns the variable stored into the translator
DBTranslator4LabelizedVariable(const std::vector< std::string > &missing_symbols, std::size_t max_dico_entries=std::numeric_limits< std::size_t >::max())
default constructor without any initial variable
DBTranslator4LabelizedVariable & operator=(const DBTranslator4LabelizedVariable &from)
copy operator
DBTranslatedValue translate(std::string_view str) final
returns the translation of a string
bool needsReordering() const final
indicates whether a reordering is needed to make the translations sorted
DBTranslator4LabelizedVariable & operator=(DBTranslator4LabelizedVariable &&from)
move operator
DBTranslator(DBTranslatedValueType val_type, const bool is_lossless, const std::vector< std::string > &missing_symbols, const bool editable_dictionary=true, std::size_t max_dico_entries=std::numeric_limits< std::size_t >::max())
default constructor
Base class for labelized discrete random variables.
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities
The union class for storing the translated values in learning databases.