45#ifndef DOXYGEN_SHOULD_SKIP_THIS
55 if (_real_variable_ !=
nullptr)
delete _real_variable_;
63 if (translated_val.cont_val == std::numeric_limits< float >::max()) {
64 if (!_nonfloat_missing_symbol_.empty())
return _nonfloat_missing_symbol_;
68 if ((translated_val.cont_val < _variable_.lowerBound())
69 || (translated_val.cont_val > _variable_.upperBound())) {
71 "The back translation of "
72 << translated_val.cont_val
73 <<
" could not be found because the value is outside the "
74 <<
"domain of the continuous variable");
78 snprintf(buffer, 100,
"%g", translated_val.cont_val);
87 return HashTable< std::size_t, std::size_t >();
92 return std::numeric_limits< std::size_t >::max();
98 _real_variable_->setUpperBoundFromDouble(_variable_.upperBound());
99 return _real_variable_;
104 return DBTranslatedValue{std::numeric_limits< float >::max()};
The class representing the original values of the cells of databases.
The databases' cell translators for continuous variables.
virtual void setLowerBoundFromDouble(const double new_bound)=0
updates the lower bound of the domain of the variable
bool empty() const noexcept
Indicates whether the set is the empty set.
iterator begin() const
The usual unsafe begin iterator to parse the set.
DBTranslator4ContinuousVariable(const std::vector< std::string > &missing_symbols, const bool fit_range=false)
default constructor without any initial variable
std::size_t domainSize() const final
returns std::numeric_limits<std::size_t>::max ()
const IContinuousVariable * variable() const final
returns the variable stored into the translator
HashTable< std::size_t, std::size_t > reorder() final
returns an empty mapping, indicating that old tanslations are equal to the newly reordered ones.
std::string translateBack(const DBTranslatedValue translated_val) const final
returns the original value for a given translation
bool needsReordering() const final
indicates that the translations should never be reordered
~DBTranslator4ContinuousVariable() override
destructor
DBTranslatedValue missingValue() const final
returns the translation of a missing value
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.