47#ifndef GUM_LEARNING_DBROW_GENERATOR_SET_H
48#define GUM_LEARNING_DBROW_GENERATOR_SET_H
193 template <
class Generator >
201 template <
class Generator >
226 template < typename GUM_SCALAR >
283#ifndef DOXYGEN_SHOULD_SKIP_THIS
287 std::vector< DBRowGenerator* > _generators_;
290 std::size_t _nb_generators_{std::size_t(0)};
314 std::vector< int > _setInputRow_performed_;
323 bool _produceNextRow_(
const DBRow< DBTranslatedValue >* input_row, std::size_t i);
Template implementation of DBRowGeneratorSet.
Base class for DBRowGenerator classes that use a BN for computing their outputs.
Class representing a Bayesian network.
void insertGenerator(const Generator &generator)
inserts a new generator at the end of the set
DBRowGeneratorSet & operator=(DBRowGeneratorSet &&from)
move operator
bool hasRows()
returns true if there are still rows that can be output by the set of generators
void setBayesNet(const BayesNet< GUM_SCALAR > &new_bn)
assign a new Bayes net to all the generators that depend on a BN
DBRowGeneratorSet(const DBRowGeneratorSet &from)
copy constructor
const DBRowGenerator & operator[](const std::size_t i) const
returns the ith generator
void reset()
resets all the generators
const std::vector< std::size_t > & columnsOfInterest() const
returns the current set of columns of interest
void setColumnsOfInterest(const std::vector< std::size_t > &cols_of_interest)
sets the columns of interest: the output DBRow needs only contain correct values fot these columns
std::size_t nbGenerators() const noexcept
returns the number of generators
DBRowGeneratorSet & operator=(const DBRowGeneratorSet &from)
copy operator
virtual ~DBRowGeneratorSet()
destructor
bool setInputRow(const DBRow< DBTranslatedValue > &input_row)
sets the input row from which the generators will create new rows
virtual DBRowGeneratorSet * clone() const
virtual copy constructor
DBRowGenerator & operator[](const std::size_t i)
returns the ith generator
void clear()
removes all the generators
const DBRow< DBTranslatedValue > & generate()
generates a new output row from the input row
void insertGenerator(const Generator &generator, const std::size_t i)
inserts a new generator at the ith position of the set
std::size_t size() const noexcept
returns the number of generators (alias for nbGenerators)
DBRowGeneratorSet(DBRowGeneratorSet &&from)
move constructor
DBRowGeneratorSet()
default constructor
The base class for all DBRow generators.
The class for storing a record in a database.
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities
The union class for storing the translated values in learning databases.