25 #ifndef GUM_LEARNING_DBROW_GENERATOR_SET_H 26 #define GUM_LEARNING_DBROW_GENERATOR_SET_H 109 template <
template <
typename >
class ALLOC = std::allocator >
189 template <
template <
template <
typename >
class >
class Generator >
197 template <
template <
template <
typename >
class >
class Generator >
199 const std::size_t i);
205 std::
size_t size() const noexcept;
223 template < typename GUM_SCALAR >
252 const
std::vector<
std::
size_t, ALLOC<
std::
size_t > >& cols_of_interest);
274 std::vector<
std::
size_t, ALLOC<
std::
size_t > >&& cols_of_interest);
277 const
std::vector<
std::
size_t, ALLOC<
std::
size_t > >&
286 #ifndef DOXYGEN_SHOULD_SKIP_THIS 290 std::vector< DBRowGenerator< ALLOC >*, ALLOC< DBRowGenerator< ALLOC >* > >
294 std::size_t __nb_generators{std::size_t(0)};
318 std::vector< int, ALLOC< int > > __setInputRow_performed;
The union class for storing the translated values in learning databases.
allocator_type getAllocator() const
returns the allocator used
Class representing a Bayesian Network.
The base class for all DBRow generators.
std::size_t size() const noexcept
returns the number of generators (alias for nbGenerators)
The class used to pack sets of generators.
DBRowGeneratorSet(const allocator_type &alloc=allocator_type())
default constructor
Base class for DBRowGenerator classes that use a BN for computing their outputs.
void clear()
removes all the generators
ALLOC< DBTranslatedValue > allocator_type
type for the allocators passed in arguments of methods
gum is the global namespace for all aGrUM entities
The union class for storing the translated values in learning databases.
The class representing a record stored in a tabular database.
void setBayesNet(const BayesNet< GUM_SCALAR > &new_bn)
assign a new Bayes net to all the generators that depend on a BN
void setColumnsOfInterest(const std::vector< std::size_t, ALLOC< std::size_t > > &cols_of_interest)
sets the columns of interest: the output DBRow needs only contain correct values fot these columns ...
DBRowGeneratorSet< ALLOC > & operator=(const DBRowGeneratorSet< ALLOC > &from)
copy operator
const std::vector< std::size_t, ALLOC< std::size_t > > & columnsOfInterest() const
returns the current set of columns of interest
Template implementation of DBRowGeneratorSet.
virtual DBRowGeneratorSet< ALLOC > * clone() const
virtual copy constructor
void reset()
resets all the generators
The class for storing a record in a database.
void insertGenerator(const Generator< ALLOC > &generator)
inserts a new generator at the end of the set
virtual ~DBRowGeneratorSet()
destructor
std::size_t nbGenerators() const noexcept
returns the number of generators
DBRowGenerator< ALLOC > & operator[](const std::size_t i)
returns the ith generator
const DBRow< DBTranslatedValue, ALLOC > & generate()
generates a new output row from the input row
bool setInputRow(const DBRow< DBTranslatedValue, ALLOC > &input_row)
sets the input row from which the generators will create new rows
The base class for all DBRow generators.
bool hasRows()
returns true if there are still rows that can be output by the set of generators