28 #ifndef GUM_LEARNING_DB_TRANSLATOR_4_LABELIZED_VARIABLE_H 29 #define GUM_LEARNING_DB_TRANSLATOR_4_LABELIZED_VARIABLE_H 134 template <
template <
typename >
class ALLOC = std::allocator >
160 template <
template <
typename >
class XALLOC >
162 const std::vector< std::string, XALLOC< std::string > >& missing_symbols,
163 std::size_t max_dico_entries = std::numeric_limits< std::size_t >::max(),
179 std::size_t max_dico_entries = std::numeric_limits< std::size_t >::max(),
201 template <
template <
typename >
class XALLOC >
204 const std::vector< std::string, XALLOC< std::string > >& missing_symbols,
205 const bool editable_dictionary =
false,
206 std::size_t max_dico_entries = std::numeric_limits< std::size_t >::max(),
230 const bool editable_dictionary =
false,
231 std::size_t max_dico_entries = std::numeric_limits< std::size_t >::max(),
370 ALLOC<
std::pair<
std::
size_t,
std::
size_t > > >
381 #ifndef DOXYGEN_SHOULD_SKIP_THIS virtual const LabelizedVariable * variable() const final
returns the variable stored into the translator
virtual DBTranslatedValue missingValue() const final
returns the translation of a missing value
ALLOC< DBTranslatedValue > allocator_type
type for the allocators passed in arguments of methods
virtual ~DBTranslator4LabelizedVariable()
destructor
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
DBTranslator4LabelizedVariable(const std::vector< std::string, XALLOC< std::string > > &missing_symbols, std::size_t max_dico_entries=std::numeric_limits< std::size_t >::max(), const allocator_type &alloc=allocator_type())
default constructor without any initial variable
virtual std::size_t domainSize() const final
returns the domain size of a variable corresponding to the translations
virtual std::string translateBack(const DBTranslatedValue translated_val) const final
returns the original value for a given translation
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The union class for storing the translated values in learning databases.
The class for generic Hash Tables.
DBTranslator4LabelizedVariable< ALLOC > & operator=(const DBTranslator4LabelizedVariable< ALLOC > &from)
copy operator
The base class for all the tabular database cell translators.
virtual bool needsReordering() const final
indicates whether a reordering is needed to make the translations sorted
virtual DBTranslatedValue translate(const std::string &str) final
returns the translation of a string
virtual DBTranslator4LabelizedVariable< ALLOC > * clone() const
virtual copy constructor
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The databases' cell translators for labelized variables.
virtual HashTable< std::size_t, std::size_t, ALLOC< std::pair< 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...
typename DBTranslator< ALLOC >::allocator_type allocator_type
type for the allocators passed in arguments of methods
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.