43#ifndef DOXYGEN_SHOULD_SKIP_THIS
53 if (_real_variable_ !=
nullptr)
delete _real_variable_;
61 if (translated_val.cont_val == std::numeric_limits< float >::max()) {
62 if (!_nonfloat_missing_symbol_.empty())
return _nonfloat_missing_symbol_;
66 if ((translated_val.cont_val < _variable_.lowerBound())
67 || (translated_val.cont_val > _variable_.upperBound())) {
69 "The back translation of "
70 << translated_val.cont_val
71 <<
" could not be found because the value is outside the "
72 <<
"domain of the continuous variable");
76 snprintf(buffer, 100,
"%g", translated_val.cont_val);
77 return std::string(buffer);
85 return HashTable< std::size_t, std::size_t >();
90 return std::numeric_limits< std::size_t >::max();
96 _real_variable_->setUpperBoundFromDouble(_variable_.upperBound());
97 return _real_variable_;
102 return DBTranslatedValue{std::numeric_limits< float >::max()};
The class representing the original values of the cells of databases.
virtual void setLowerBoundFromDouble(const double new_bound)=0
updates the lower bound of the domain of the variable
DBTranslator4ContinuousVariable(const std::vector< std::string > &missing_symbols, const bool fit_range=false)
default constructor without any initial variable
virtual DBTranslatedValue missingValue() const final
returns the translation of a missing value
virtual HashTable< std::size_t, std::size_t > reorder() final
returns an empty mapping, indicating that old tanslations are equal to the newly reordered ones.
virtual ~DBTranslator4ContinuousVariable()
destructor
virtual bool needsReordering() const final
indicates that the translations should never be reordered
virtual std::string translateBack(const DBTranslatedValue translated_val) const final
returns the original value for a given translation
virtual const IContinuousVariable * variable() const final
returns the variable stored into the translator
virtual std::size_t domainSize() const final
returns std::numeric_limits<std::size_t>::max ()
Set< std::string > missing_symbols_
the set of missing symbols
#define GUM_ERROR(type, msg)
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.