27 #ifndef DOXYGEN_SHOULD_SKIP_THIS 33 # include <agrum/tools/database/DBTranslator4ContinuousVariable.h> 34 # include <agrum/tools/database/DBCell.h> 42 template <
template <
typename >
class ALLOC >
43 template <
template <
typename >
class XALLOC >
44 DBTranslator4ContinuousVariable< ALLOC >::DBTranslator4ContinuousVariable(
45 const std::vector< std::string, XALLOC< std::string > >& missing_symbols,
47 const typename DBTranslator4ContinuousVariable< ALLOC >::allocator_type& alloc) :
48 DBTranslator< ALLOC >(DBTranslatedValueType::CONTINUOUS,
54 _variable_(
"var",
""), _fit_range_(fit_range) {
62 for (
auto iter =
this->missing_symbols_.beginSafe(); iter !=
this->missing_symbols_.endSafe();
64 if (DBCell::isReal(*iter)) {
this->missing_symbols_.erase(iter); }
69 if (!
this->missing_symbols_.empty()) {
70 _nonfloat_missing_symbol_ = *(
this->missing_symbols_.begin());
76 if (_fit_range_) _variable_.setLowerBound(std::numeric_limits<
float >::infinity());
79 _real_variable_ = _variable_.clone();
81 GUM_CONSTRUCTOR(DBTranslator4ContinuousVariable);
86 template <
template <
typename >
class ALLOC >
105 template <
template <
typename >
class ALLOC >
150 template <
template <
typename >
class ALLOC >
172 template <
template <
typename >
class ALLOC >
173 template <
template <
typename >
class XALLOC >
217 template <
template <
typename >
class ALLOC >
238 template <
template <
typename >
class ALLOC >
254 template <
template <
typename >
class ALLOC >
261 template <
template <
typename >
class ALLOC >
279 template <
template <
typename >
class ALLOC >
286 template <
template <
typename >
class ALLOC >
302 template <
template <
typename >
class ALLOC >
310 template <
template <
typename >
class ALLOC >
319 template <
template <
typename >
class ALLOC >
338 template <
template <
typename >
class ALLOC >
358 template <
template <
typename >
class ALLOC >
366 "String \"" <<
str <<
"\" cannot be translated because it is not a number");
385 <<
"\" cannot be translated because it is " 386 "out of the domain of the continuous variable");
416 "String \"" <<
str <<
"\" cannot be translated because " 417 <<
"it would induce a new domain containing an already " 418 <<
"translated missing symbol");
449 "String \"" <<
str <<
"\" cannot be translated because " 450 <<
"it would induce a new domain containing an already " 451 <<
"translated missing symbol");
479 template <
template <
typename >
class ALLOC >
490 "The back translation of " 492 <<
" could not be found because the value is outside the " 493 <<
"domain of the continuous variable");
503 template <
template <
typename >
class ALLOC >
510 template <
template <
typename >
class ALLOC >
520 template <
template <
typename >
class ALLOC >
527 template <
template <
typename >
class ALLOC >
536 template <
template <
typename >
class ALLOC >
INLINE void emplace(Args &&... args)
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)