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 >
236 if (
exc !=
nullptr) {
283 template <
template <
typename >
class ALLOC >
290 "Column " <<
input_column <<
" is marked as being ignored. " 291 <<
"So it is forbidden to create a translator for that column.")
331 for (;
i <
end; ++
i) {
356 template <
template <
typename >
class ALLOC >
363 "Column " <<
input_column <<
" is marked as being ignored. " 364 <<
"So it is forbidden to create a translator for that column.")
372 "inserting a new translator into a database creates a new column " 373 <<
"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.")
461 for (;
i <
end; ++
i) {
489 template <
template <
typename >
class ALLOC >
511 template <
template <
typename >
class ALLOC >
552 template <
template <
typename >
class ALLOC >
561 template <
template <
typename >
class ALLOC >
577 template <
template <
typename >
class ALLOC >
589 "there is no translator in the database table that " 590 <<
"parses Column " <<
k)
593 "the database has " <<
nb_trans <<
" translators, so Translator #" <<
k 594 <<
" does not exist")
603 template <
template <
typename >
class ALLOC >
615 "there is no variable in the database table that " 616 <<
"corresponds to Column " <<
k)
619 "the database has " <<
nb_trans <<
" variables, so Variable #" <<
k 620 <<
" does not exist")
629 template <
template <
typename >
class ALLOC >
638 "the number of variable's names (i.e., " 639 <<
size <<
") does not correspond to the number of columns of the " 640 <<
"database table (i.e.," <<
nb_trans <<
")")
650 "the names vector has " 651 <<
size <<
" elements whereas it should have at least " 653 <<
"elements so that each translator is assigned a name")
672 template <
template <
typename >
class ALLOC >
686 "It is impossible to ignore the column parsed by Translator #" 687 <<
k <<
"because there exist only " <<
nb_trans <<
" translators")
697 template <
template <
typename >
class ALLOC >
737 template <
template <
typename >
class ALLOC >
752 template <
template <
typename >
class ALLOC >
763 "there is no variable in the database table that " 764 <<
"corresponds to Column " <<
k)
767 "the database has " <<
nb_trans <<
" variables, so Variable #" <<
k 768 <<
" does not exist")
777 template <
template <
typename >
class ALLOC >
791 template <
template <
typename >
class ALLOC >
802 "there is no translator in the database table that " 803 <<
"parses Column " <<
k)
806 "the database has " <<
nb_trans <<
" translators, so Translator #" <<
k 807 <<
" does not exist")
817 template <
template <
typename >
class ALLOC >
827 "there is no translator in the database table that " 828 <<
"parses Column " <<
k)
831 "the database has " <<
nb_trans <<
" translators, so Translator #" <<
k 832 <<
" does not exist")
871 template <
template <
typename >
class ALLOC >
880 template <
template <
typename >
class ALLOC >
891 <<
" columns whereas the database requires at least " 912 template <
template <
typename >
class ALLOC >
948 template <
template <
typename >
class ALLOC >
958 <<
" elements whereas the database table has " 971 template <
template <
typename >
class ALLOC >
981 <<
" elements whereas the database table has " 993 template <
template <
typename >
class ALLOC >
1000 template <
template <
typename >
class ALLOC >
1008 template <
template <
typename >
class ALLOC >
1020 <<
" elements whereas the database table has " 1034 template <
template <
typename >
class ALLOC >
1046 <<
" elements whereas the database table has " 1059 template <
template <
typename >
class ALLOC >
1067 template <
template <
typename >
class ALLOC >
1075 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)