28 #ifndef DOXYGEN_SHOULD_SKIP_THIS 35 template <
template <
typename >
class ALLOC >
43 template <
template <
typename >
class ALLOC >
49 DBRowGenerator< ALLOC >(
56 template <
template <
typename >
class ALLOC >
58 const DBRowGenerator4CompleteRows< ALLOC >& from,
62 __input_row(from.__input_row) {
68 template <
template <
typename >
class ALLOC >
70 const DBRowGenerator4CompleteRows< ALLOC >& from) :
75 template <
template <
typename >
class ALLOC >
77 DBRowGenerator4CompleteRows< ALLOC >&& from,
81 __input_row(from.__input_row) {
87 template <
template <
typename >
class ALLOC >
89 DBRowGenerator4CompleteRows< ALLOC >&& from) :
95 template <
template <
typename >
class ALLOC >
96 DBRowGenerator4CompleteRows< ALLOC >*
100 ALLOC< DBRowGenerator4CompleteRows< ALLOC > > allocator(alloc);
101 DBRowGenerator4CompleteRows< ALLOC >* generator = allocator.allocate(1);
103 allocator.construct(generator, *
this, alloc);
105 allocator.deallocate(generator, 1);
113 template <
template <
typename >
class ALLOC >
114 DBRowGenerator4CompleteRows< ALLOC >*
121 template <
template <
typename >
class ALLOC >
128 template <
template <
typename >
class ALLOC >
130 operator=(
const DBRowGenerator4CompleteRows< ALLOC >& from) {
132 __input_row = from.__input_row;
138 template <
template <
typename >
class ALLOC >
140 operator=(DBRowGenerator4CompleteRows< ALLOC >&& from) {
142 __input_row = from.__input_row;
148 template <
template <
typename >
class ALLOC >
149 INLINE
const DBRow< DBTranslatedValue, ALLOC >&
157 template <
template <
typename >
class ALLOC >
159 const DBRow< DBTranslatedValue, ALLOC >& row) {
161 const auto& xrow = row.row();
165 if (xrow[col].discr_val == std::numeric_limits< std::size_t >::max()) {
166 __input_row =
nullptr;
167 return std::size_t(0);
172 if (xrow[col].cont_val == std::numeric_limits< float >::max()) {
173 __input_row =
nullptr;
174 return std::size_t(0);
181 <<
" is not supported yet");
186 return std::size_t(1);
std::vector< std::size_t, ALLOC< std::size_t > > _columns_of_interest
the set of columns of interest
DBRowGeneratorGoal
the type of things that a DBRowGenerator is designed for
DBRowGenerator< ALLOC > & operator=(const DBRowGenerator< ALLOC > &)
copy constructor
void decreaseRemainingRows()
decrease the number of remaining output rows
gum is the global namespace for all aGrUM entities
virtual std::size_t _computeRows(const DBRow< DBTranslatedValue, ALLOC > &row) final
computes the rows it will provide as output
DBRowGenerator4CompleteRows< ALLOC > & operator=(const DBRowGenerator4CompleteRows< ALLOC > &from)
copy operator
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
allocator_type getAllocator() const
returns the allocator used
~DBRowGenerator4CompleteRows()
destructor
DBRowGenerator(const std::vector< DBTranslatedValueType, ALLOC< DBTranslatedValueType > > column_types, const DBRowGeneratorGoal goal, const allocator_type &alloc=allocator_type())
default constructor
DBRowGenerator4CompleteRows(const std::vector< DBTranslatedValueType, ALLOC< DBTranslatedValueType > > column_types, const allocator_type &alloc=allocator_type())
default constructor
std::vector< DBTranslatedValueType, ALLOC< DBTranslatedValueType > > _column_types
the types of the columns in the DatabaseTable
virtual const DBRow< DBTranslatedValue, ALLOC > & generate() final
generates one ouput DBRow for each DBRow passed to method setInputRow
virtual DBRowGenerator4CompleteRows< ALLOC > * clone() const override final
virtual copy constructor
A DBRowGenerator class that returns the rows that are complete (fully observed) w.r.t.
#define GUM_ERROR(type, msg)