28 #ifndef GUM_LEARNING_DBROW_GENERATOR_WITH_BN_H 29 #define GUM_LEARNING_DBROW_GENERATOR_WITH_BN_H 33 #include <agrum/agrum.h> 34 #include <agrum/tools/core/bijection.h> 35 #include <agrum/BN/BayesNet.h> 36 #include <agrum/BN/inference/variableElimination.h> 37 #include <agrum/tools/database/DBRowGenerator.h> 80 template <
typename GUM_SCALAR =
double,
template <
typename >
class ALLOC = std::allocator >
106 const allocator_type& alloc);
113 const allocator_type& alloc);
128 virtual void setBayesNet(
const BayesNet< GUM_SCALAR >& new_bn);
162 #include <agrum/tools/database/DBRowGeneratorWithBN_tpl.h> ~DBRowGeneratorWithBN()
destructor
INLINE void emplace(Args &&... args)
Bijection< NodeId, std::size_t, ALLOC< std::size_t > > nodeId2columns_
the mapping betwen the BN's node ids and the database's columns
DBRowGeneratorWithBN(const DBRowGeneratorWithBN< GUM_SCALAR, ALLOC > &from)
copy constructor
DBRowGeneratorWithBN(const DBRowGeneratorWithBN< GUM_SCALAR, ALLOC > &from, const allocator_type &alloc)
copy constructor with a given allocator
DBRowGeneratorWithBN< GUM_SCALAR, ALLOC > & operator=(DBRowGeneratorWithBN< GUM_SCALAR, ALLOC > &&from)
move operator
DBRowGeneratorWithBN< GUM_SCALAR, ALLOC > & operator=(const DBRowGeneratorWithBN< GUM_SCALAR, ALLOC > &from)
copy operator
allocator_type getAllocator() const
returns the allocator used
virtual void setBayesNet(const BayesNet< GUM_SCALAR > &new_bn)
assign a new Bayes net to the generator
DBRowGeneratorWithBN(const std::vector< DBTranslatedValueType, ALLOC< DBTranslatedValueType > > column_types, const BayesNet< GUM_SCALAR > &bn, const DBRowGeneratorGoal goal, const Bijection< NodeId, std::size_t, ALLOC< std::size_t > > &nodeId2columns=Bijection< NodeId, std::size_t, ALLOC< std::size_t > >(), const allocator_type &alloc=allocator_type())
default constructor
DBRowGeneratorWithBN(DBRowGeneratorWithBN< GUM_SCALAR, ALLOC > &&from, const allocator_type &alloc)
move constructor with a given allocator
const BayesNet< GUM_SCALAR > & getBayesNet() const
returns the Bayes net used by the generator
const BayesNet< GUM_SCALAR > * bn_
the Bayesian network used to fill the unobserved values
DBRowGeneratorWithBN(DBRowGeneratorWithBN< GUM_SCALAR, ALLOC > &&from)
move constructor
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)