aGrUM  0.16.0
DBRowGenerator4CompleteRows.h
Go to the documentation of this file.
1 
29 #ifndef GUM_LEARNING_DBROW_GENERATOR_4_COMPLETE_ROWS_H
30 #define GUM_LEARNING_DBROW_GENERATOR_4_COMPLETE_ROWS_H
31 
32 #include <agrum/agrum.h>
34 
35 namespace gum {
36 
37  namespace learning {
38 
79  template < template < typename > class ALLOC = std::allocator >
80  class DBRowGenerator4CompleteRows : public DBRowGenerator< ALLOC > {
81  public:
83  using allocator_type = ALLOC< DBTranslatedValue >;
84 
85  // ##########################################################################
87  // ##########################################################################
88 
90 
93  const std::vector< DBTranslatedValueType, ALLOC< DBTranslatedValueType > >
94  column_types,
95  const allocator_type& alloc = allocator_type());
96 
100 
103  const allocator_type& alloc);
104 
107 
110  const allocator_type& alloc);
111 
113  virtual DBRowGenerator4CompleteRows< ALLOC >* clone() const override final;
114 
116  virtual DBRowGenerator4CompleteRows< ALLOC >*
117  clone(const allocator_type& alloc) const override final;
118 
121 
123 
124 
125  // ##########################################################################
127  // ##########################################################################
128 
130 
133  operator=(const DBRowGenerator4CompleteRows< ALLOC >& from);
134 
137  operator=(DBRowGenerator4CompleteRows< ALLOC >&& from);
138 
140 
141 
142  // ##########################################################################
144  // ##########################################################################
145 
147 
149 
152  virtual const DBRow< DBTranslatedValue, ALLOC >& generate() final;
153 
156 
158 
159 
160  protected:
162  virtual std::size_t
163  _computeRows(const DBRow< DBTranslatedValue, ALLOC >& row) final;
164 
165 
166 #ifndef DOXYGEN_SHOULD_SKIP_THIS
167 
168  private:
170  const DBRow< DBTranslatedValue, ALLOC >* __input_row{nullptr};
171 
172 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
173  };
174 
175  } /* namespace learning */
176 
177 } /* namespace gum */
178 
179 
180 // always include the template implementation
182 
183 #endif /* GUM_LEARNING_DBROW_GENERATOR_4_COMPLETE_ROWS_H */
ALLOC< DBTranslatedValue > allocator_type
type for the allocators passed in arguments of methods
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
STL namespace.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
The union class for storing the translated values in learning databases.
virtual std::size_t _computeRows(const DBRow< DBTranslatedValue, ALLOC > &row) final
computes the rows it will provide as output
ALLOC< DBTranslatedValue > allocator_type
type for the allocators passed in arguments of methods
DBTranslatedValueType
The nature of the elements handled by translators (discrete, continuous).
allocator_type getAllocator() const
returns the allocator used
The class for storing a record in a database.
Definition: DBRow.h:56
DBRowGenerator4CompleteRows(const std::vector< DBTranslatedValueType, ALLOC< DBTranslatedValueType > > column_types, const allocator_type &alloc=allocator_type())
default constructor
A DBRowGenerator class that returns the rows that are complete (fully observed) w.r.t.
virtual const DBRow< DBTranslatedValue, ALLOC > & generate() final
generates one ouput DBRow for each DBRow passed to method setInputRow
The base class for all DBRow generators.
virtual DBRowGenerator4CompleteRows< ALLOC > * clone() const override final
virtual copy constructor