27 #ifndef GUM_LEARNING_DB_TRANSLATOR_4_INTEGER_VARIABLE_H 28 #define GUM_LEARNING_DB_TRANSLATOR_4_INTEGER_VARIABLE_H 30 #include <agrum/agrum.h> 31 #include <agrum/tools/database/DBTranslator.h> 32 #include <agrum/tools/variables/integerVariable.h> 117 template <
template <
typename >
class ALLOC =
std::
allocator >
141 template <
template <
typename >
class XALLOC >
143 const IntegerVariable& var,
160 std::size_t max_dico_entries
169 const allocator_type& alloc);
176 const allocator_type& alloc);
268 #ifndef DOXYGEN_SHOULD_SKIP_THIS 272 IntegerVariable _variable_;
285 #include <agrum/tools/database/DBTranslator4IntegerVariable_tpl.h> virtual ~DBTranslator4IntegerVariable()
destructor
virtual const IntegerVariable * variable() const final
returns the variable stored into the translator
virtual std::string translateBack(const DBTranslatedValue translated_val) const final
returns the original value for a given translation
DBTranslator4IntegerVariable< ALLOC > & operator=(const DBTranslator4IntegerVariable< ALLOC > &from)
copy operator
INLINE void emplace(Args &&... args)
DBTranslator4IntegerVariable(const DBTranslator4IntegerVariable< ALLOC > &from, const allocator_type &alloc)
copy constructor with a given allocator
virtual DBTranslator4IntegerVariable< ALLOC > * clone() const
virtual copy constructor
virtual DBTranslatedValue missingValue() const final
returns the translation of a missing value
virtual void setEditableDictionaryMode(bool new_mode) final
sets/unset the editable dictionary mode
DBTranslator4IntegerVariable(DBTranslator4IntegerVariable< ALLOC > &&from)
move constructor
DBTranslator4IntegerVariable< ALLOC > & operator=(DBTranslator4IntegerVariable< ALLOC > &&from)
move operator
virtual DBTranslatedValue translate(const std::string &str) final
returns the translation of a string
virtual bool hasEditableDictionary() const final
indicates that the translator is never in editable dictionary mode
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.
DBTranslator4IntegerVariable(const IntegerVariable &var, std::size_t max_dico_entries=std::numeric_limits< std::size_t >::max(), const allocator_type &alloc=allocator_type())
default constructor with an integer variable as translator but without missing symbols ...
virtual std::size_t domainSize() const final
returns the domain size of the variable used for translations
virtual DBTranslator4IntegerVariable< ALLOC > * clone(const allocator_type &alloc) const
virtual copy constructor with a given allocator
virtual bool needsReordering() const final
indicates that the translations should never be reordered
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)
DBTranslator4IntegerVariable(const DBTranslator4IntegerVariable< ALLOC > &from)
copy constructor
DBTranslator4IntegerVariable(const IntegerVariable &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 an integer variable as translator
DBTranslator4IntegerVariable(DBTranslator4IntegerVariable< ALLOC > &&from, const allocator_type &alloc)
move constructor with a given allocator