47#ifndef GUM_LEARNING_DBROW_GENERATOR_H
48#define GUM_LEARNING_DBROW_GENERATOR_H
Template implementation of DBRowGenerator.
The class representing a record stored in a tabular database.
The union class for storing the translated values in learning databases.
bool setInputRow(const DBRow< DBTranslatedValue > &row)
sets the input row from which the generator will create its output rows
std::vector< std::size_t > columns_of_interest_
the set of columns of interest
DBRowGenerator(const std::vector< DBTranslatedValueType > &column_types, const DBRowGeneratorGoal goal)
default constructor
const std::vector< std::size_t > & columnsOfInterest() const
returns the current set of columns of interest
bool hasRows()
returns true if there are still rows that can be output by the DBRowGenerator
DBRowGenerator & operator=(const DBRowGenerator &)
copy constructor
DBRowGeneratorGoal goal_
the goal of the DBRowGenerator (just remove missing values or not)
DBRowGenerator(DBRowGenerator &&from)
move constructor
virtual const DBRow< DBTranslatedValue > & generate()=0
generate new rows from the input row
virtual void setColumnsOfInterest(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 nb_remaining_output_rows_
the number of output rows still to retrieve through the generate method
DBRowGenerator & operator=(DBRowGenerator &&)
move constructor
DBRowGenerator(const DBRowGenerator &from)
copy constructor
std::vector< DBTranslatedValueType > column_types_
the types of the columns in the DatabaseTable
void decreaseRemainingRows()
decrease the number of remaining output rows
virtual DBRowGenerator * clone() const =0
virtual copy constructor
virtual std::size_t computeRows_(const DBRow< DBTranslatedValue > &row)=0
the method that computes the set of DBRow instances to output after method setInputRow has been calle...
DBRowGeneratorGoal goal() const
returns the goal of the DBRowGenerator
virtual 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
virtual void reset()
resets the generator. There are therefore no more ouput row to generate
virtual ~DBRowGenerator()
destructor
The class for storing a record in a database.
DBRowGeneratorGoal
the type of things that a DBRowGenerator is designed for
@ OTHER_THINGS_THAN_REMOVE_MISSING_VALUES
@ ONLY_REMOVE_MISSING_VALUES
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities