27 #include <agrum/tools/database/databaseTable.h> 29 #ifndef DOXYGEN_SHOULD_SKIP_THIS 37 template <
template <
typename >
class ALLOC >
38 template <
template <
typename >
class XALLOC >
39 DatabaseTable< ALLOC >::DatabaseTable(
40 const typename DatabaseTable< ALLOC >::
template MissingValType< XALLOC >& missing_symbols,
41 const DBTranslatorSet< ALLOC >& translators,
42 const typename DatabaseTable< ALLOC >::allocator_type& alloc) :
43 IDatabaseTable< DBTranslatedValue, ALLOC >(
45 std::vector< std::string, ALLOC< std::string > >(),
47 _translators_(translators, alloc) {
48 if (translators.size()) {
50 std::vector< std::string, ALLOC< std::string > > var_names(translators.size());
51 for (std::size_t i = std::size_t(0), size = translators.size(); i < size; ++i) {
52 var_names[i] = _translators_.translator(i).variable()->name();
54 setVariableNames(var_names,
false);
57 GUM_CONSTRUCTOR(DatabaseTable);
62 template <
template <
typename >
class ALLOC >
85 template <
template <
typename >
class ALLOC >
96 template <
template <
typename >
class ALLOC >
102 template <
template <
typename >
class ALLOC >
114 template <
template <
typename >
class ALLOC >
120 template <
template <
typename >
class ALLOC >
137 template <
template <
typename >
class ALLOC >
144 template <
template <
typename >
class ALLOC >
151 template <
template <
typename >
class ALLOC >
164 template <
template <
typename >
class ALLOC >
177 template <
template <
typename >
class ALLOC >
227 if (
exc !=
nullptr) {
271 template <
template <
typename >
class ALLOC >
278 "Column " <<
input_column <<
" is marked as being ignored. " 279 <<
"So it is forbidden to create a translator for that column.")
325 for (;
i <
end; ++
i) {
352 template <
template <
typename >
class ALLOC >
359 "Column " <<
input_column <<
" is marked as being ignored. " 360 <<
"So it is forbidden to create a translator for that column.")
368 "inserting a new translator into a database creates a new column " 369 <<
"with missing values. However, you did not define any symbol for " 410 template <
template <
typename >
class ALLOC >
411 template <
template <
typename >
class XALLOC >
420 "Column " <<
input_column <<
" is marked as being ignored. " 421 <<
"So it is forbidden to create a translator for that column.")
467 for (;
i <
end; ++
i) {
497 template <
template <
typename >
class ALLOC >
519 template <
template <
typename >
class ALLOC >
564 template <
template <
typename >
class ALLOC >
573 "the translator at position " <<
k <<
'/' <<
db_k <<
598 "Lossy translators cannot yet be substituted by other translators");
628 if (!
this->
empty()) {
672 "it is impossible to substitute the translator because " 673 "the database contains some missing values that cannot be " 674 "substituted unambiguously");
692 "it is impossible to substitute the translator because " 693 "the database contains some missing values that cannot be " 742 "The database contains some values that cannot be translated " 743 "using the new translator");
781 template <
template <
typename >
class ALLOC >
798 template <
template <
typename >
class ALLOC >
807 template <
template <
typename >
class ALLOC >
823 template <
template <
typename >
class ALLOC >
835 "there is no translator in the database table that " 836 <<
"parses Column " <<
k)
839 "the database has " <<
nb_trans <<
" translators, so Translator #" <<
k 840 <<
" does not exist")
849 template <
template <
typename >
class ALLOC >
861 "there is no variable in the database table that " 862 <<
"corresponds to Column " <<
k)
865 "the database has " <<
nb_trans <<
" variables, so Variable #" <<
k 866 <<
" does not exist")
875 template <
template <
typename >
class ALLOC >
884 "the number of variable's names (i.e., " 885 <<
size <<
") does not correspond to the number of columns of the " 886 <<
"database table (i.e.," <<
nb_trans <<
")")
896 "the names vector has " 897 <<
size <<
" elements whereas it should have at least " 899 <<
"elements so that each translator is assigned a name")
918 template <
template <
typename >
class ALLOC >
932 "It is impossible to ignore the column parsed by Translator #" 933 <<
k <<
"because there exist only " <<
nb_trans <<
" translators")
943 template <
template <
typename >
class ALLOC >
983 template <
template <
typename >
class ALLOC >
998 template <
template <
typename >
class ALLOC >
1009 "there is no variable in the database table that " 1010 <<
"corresponds to Column " <<
k)
1013 "the database has " <<
nb_trans <<
" variables, so Variable #" <<
k 1014 <<
" does not exist")
1023 template <
template <
typename >
class ALLOC >
1037 template <
template <
typename >
class ALLOC >
1048 "there is no translator in the database table that " 1049 <<
"parses Column " <<
k)
1052 "the database has " <<
nb_trans <<
" translators, so Translator #" <<
k 1053 <<
" does not exist")
1063 template <
template <
typename >
class ALLOC >
1073 "there is no translator in the database table that " 1074 <<
"parses Column " <<
k)
1077 "the database has " <<
nb_trans <<
" translators, so Translator #" <<
k 1078 <<
" does not exist")
1121 template <
template <
typename >
class ALLOC >
1130 template <
template <
typename >
class ALLOC >
1141 <<
" columns whereas the database requires at least " 1162 template <
template <
typename >
class ALLOC >
1198 template <
template <
typename >
class ALLOC >
1208 <<
" elements whereas the database table has " 1221 template <
template <
typename >
class ALLOC >
1231 <<
" elements whereas the database table has " 1243 template <
template <
typename >
class ALLOC >
1250 template <
template <
typename >
class ALLOC >
1258 template <
template <
typename >
class ALLOC >
1270 <<
" elements whereas the database table has " 1284 template <
template <
typename >
class ALLOC >
1296 <<
" elements whereas the database table has " 1309 template <
template <
typename >
class ALLOC >
1317 template <
template <
typename >
class ALLOC >
1325 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)