25 #ifndef GUM_LEARNING_DB_TRANSLATOR_4_DISCRETIZED_VARIABLE_H 26 #define GUM_LEARNING_DB_TRANSLATOR_4_DISCRETIZED_VARIABLE_H 117 template <
template <
typename >
class ALLOC = std::allocator >
144 template <
typename GUM_SCALAR,
template <
typename >
class XALLOC >
147 const std::vector< std::string, XALLOC< std::string > >& missing_symbols,
148 std::size_t max_dico_entries = std::numeric_limits< std::size_t >::max(),
165 template <
typename GUM_SCALAR >
168 std::size_t max_dico_entries = std::numeric_limits< std::size_t >::max(),
185 template <
template <
typename >
class XALLOC >
188 const std::vector< std::string, XALLOC< std::string > >& missing_symbols,
189 std::size_t max_dico_entries = std::numeric_limits< std::size_t >::max(),
208 std::size_t max_dico_entries = std::numeric_limits< std::size_t >::max(),
312 ALLOC<
std::pair<
std::
size_t,
std::
size_t > > >
324 #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
gum is the global namespace for all aGrUM entities
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
The databases' cell translators for discretized variables.
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
The base class for all the tabular databases' cell translators.
virtual void setEditableDictionaryMode(bool new_mode) final
sets/unset the editable dictionary mode
A base class for discretized variables, independent of the ticks type.