28 #ifndef GUM_LEARNING_DB_TRANSLATOR_4_DISCRETIZED_VARIABLE_H 29 #define GUM_LEARNING_DB_TRANSLATOR_4_DISCRETIZED_VARIABLE_H 120 template <
template <
typename >
class ALLOC = std::allocator >
147 template <
typename GUM_SCALAR,
template <
typename >
class XALLOC >
150 const std::vector< std::string, XALLOC< std::string > >& missing_symbols,
151 std::size_t max_dico_entries = std::numeric_limits< std::size_t >::max(),
168 template <
typename GUM_SCALAR >
171 std::size_t max_dico_entries = std::numeric_limits< std::size_t >::max(),
188 template <
template <
typename >
class XALLOC >
191 const std::vector< std::string, XALLOC< std::string > >& missing_symbols,
192 std::size_t max_dico_entries = std::numeric_limits< std::size_t >::max(),
211 std::size_t max_dico_entries = std::numeric_limits< std::size_t >::max(),
315 ALLOC<
std::pair<
std::
size_t,
std::
size_t > > >
327 #ifndef DOXYGEN_SHOULD_SKIP_THIS DBTranslator4DiscretizedVariable< ALLOC > & operator=(const DBTranslator4DiscretizedVariable< ALLOC > &from)
copy operator
ALLOC< DBTranslatedValue > allocator_type
type for the allocators passed in arguments of methods
virtual DBTranslator4DiscretizedVariable< ALLOC > * clone() const
virtual copy constructor
virtual DBTranslatedValue translate(const std::string &str) final
returns the translation of a string
virtual ~DBTranslator4DiscretizedVariable()
destructor
Class for discretized random variable.
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.
virtual const IDiscretizedVariable * variable() const final
returns the variable stored into the translator
virtual DBTranslatedValue missingValue() const final
returns the translation of a missing value
virtual bool hasEditableDictionary() const final
indicates that the translator is never in editable dictionary mode
virtual bool needsReordering() const final
indicates that the translations should never be reordered
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The base class for all the tabular database cell translators.
DBTranslator4DiscretizedVariable(const DiscretizedVariable< GUM_SCALAR > &var, 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 with a discretized variable as translator
The databases' cell translators for discretized variables.
virtual std::size_t domainSize() const final
returns the number of discretization intervals used for translations
virtual HashTable< std::size_t, std::size_t, ALLOC< std::pair< std::size_t, std::size_t > > > reorder() final
returns an empty HashTable to indicate that no reordering is needed.
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.
virtual void setEditableDictionaryMode(bool new_mode) final
sets/unset the editable dictionary mode
A base class for discretized variables, independent of the ticks type.