25 #ifndef GUM_LEARNING_DB_ROW_GENERATOR_PARSER_H 26 #define GUM_LEARNING_DB_ROW_GENERATOR_PARSER_H 85 template <
template<
typename>
class ALLOC = std::allocator>
234 void setRange(std::size_t begin, std::size_t end);
247 const std::vector<std::size_t,ALLOC<std::size_t>>& cols_of_interest );
260 std::vector<std::size_t,ALLOC<std::size_t>>&& cols_of_interest );
268 template <
typename GUM_SCALAR >
DatabaseTable< ALLOC >::Handler & handler()
returns the handler used by the parser
Class representing a Bayesian Network.
std::size_t __generator_size
the size of the generator set
virtual DBRowGeneratorParser< ALLOC > * clone() const
virtual copy constructor
The class representing a tabular database stored in RAM.
void setBayesNet(const BayesNet< GUM_SCALAR > &new_bn)
assign a new Bayes net to all the generators that depend on a BN
The base class for all database handlers.
The class used to pack sets of generators.
gum is the global namespace for all aGrUM entities
DBRowGeneratorParser< ALLOC > & operator=(const DBRowGeneratorParser< ALLOC > &from)
copy operator
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 values fot these columns ...
typename IDatabaseTable< DBTranslatedValue, ALLOC >::Handler Handler
the unsafe handler type
allocator_type getAllocator() const
returns the allocator used
virtual ~DBRowGeneratorParser()
destructor
Template implementation of the DBRowGeneratorParser class.
The class for storing a record in a database.
const DBRow< DBTranslatedValue, ALLOC > & row()
returns a new output row with its corresponding weight
The class representing a tabular database as used by learning tasks.
bool hasRows()
returns true if there are still rows that can be output by the DBRowGeneratorParser ...
class for packing sets of generators
DBRowGeneratorSet< ALLOC > & generatorSet()
returns the generator set that is actually used
const DatabaseTable< ALLOC > & database() const
returns a reference on the database
ALLOC< DBTranslatedValue > allocator_type
type for the allocators passed in arguments of methods
DBRowGeneratorSet< ALLOC > __generator_set
the set of DBRow generators (might be empty)
the class used to read a row in the database and to transform it into a set of DBRow instances that c...
void reset()
resets the parser
void setRange(std::size_t begin, std::size_t end)
sets the area in the database the handler will handle
DBRowGeneratorParser(const typename DatabaseTable< ALLOC >::Handler &handler, const DBRowGeneratorSet< ALLOC > &generator_set, const allocator_type &alloc=allocator_type())
default constructor
DatabaseTable< ALLOC >::Handler __handler
the handler that is really used to parse the database