aGrUM  0.16.0
DBRowGeneratorIdentity.h
Go to the documentation of this file.
1 
28 #ifndef GUM_LEARNING_DBROW_GENERATOR_IDENTITY_H
29 #define GUM_LEARNING_DBROW_GENERATOR_IDENTITY_H
30 
31 #include <agrum/agrum.h>
33 
34 namespace gum {
35 
36  namespace learning {
37 
75  template < template < typename > class ALLOC = std::allocator >
76  class DBRowGeneratorIdentity : public DBRowGenerator< ALLOC > {
77  public:
79  using allocator_type = ALLOC< DBTranslatedValue >;
80 
81  // ##########################################################################
83  // ##########################################################################
84 
86 
89  const std::vector< DBTranslatedValueType, ALLOC< DBTranslatedValueType > >
90  column_types,
91  const allocator_type& alloc = allocator_type());
92 
95 
98  const allocator_type& alloc);
99 
102 
105  const allocator_type& alloc);
106 
108  virtual DBRowGeneratorIdentity< ALLOC >* clone() const override final;
109 
111  virtual DBRowGeneratorIdentity< ALLOC >*
112  clone(const allocator_type& alloc) const override final;
113 
116 
118 
119 
120  // ##########################################################################
122  // ##########################################################################
123 
125 
127  DBRowGeneratorIdentity< ALLOC >&
128  operator=(const DBRowGeneratorIdentity< ALLOC >& from);
129 
131  DBRowGeneratorIdentity< ALLOC >&
132  operator=(DBRowGeneratorIdentity< ALLOC >&& from);
133 
135 
136 
137  // ##########################################################################
139  // ##########################################################################
140 
142 
144  virtual const DBRow< DBTranslatedValue, ALLOC >& generate() final;
145 
148 
150 
151 
152  protected:
154  virtual std::size_t
155  _computeRows(const DBRow< DBTranslatedValue, ALLOC >& row) final;
156 
157 
158 #ifndef DOXYGEN_SHOULD_SKIP_THIS
159 
160  private:
162  const DBRow< DBTranslatedValue, ALLOC >* __input_row{nullptr};
163 
164 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
165  };
166 
167  } /* namespace learning */
168 
169 } /* namespace gum */
170 
171 
172 // always include the template implementation
174 
175 #endif /* GUM_LEARNING_DBROW_GENERATOR_IDENTITY_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.
allocator_type getAllocator() const
returns the allocator used
DBRowGeneratorIdentity(const std::vector< DBTranslatedValueType, ALLOC< DBTranslatedValueType > > column_types, const allocator_type &alloc=allocator_type())
default constructor
virtual DBRowGeneratorIdentity< ALLOC > * clone() const override final
virtual copy constructor
STL namespace.
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.
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
DBTranslatedValueType
The nature of the elements handled by translators (discrete, continuous).
A DBRowGenerator class that returns exactly the rows it gets in input.
The class for storing a record in a database.
Definition: DBRow.h:56
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.
ALLOC< DBTranslatedValue > allocator_type
type for the allocators passed in arguments of methods