51#ifndef DOXYGEN_SHOULD_SKIP_THIS
64 const std::vector< DBTranslatedValueType >& column_types) :
66 GUM_CONSTRUCTOR(DBRowGenerator4CompleteRows);
70 DBRowGenerator4CompleteRows::DBRowGenerator4CompleteRows(
71 const DBRowGenerator4CompleteRows& from) :
72 DBRowGenerator(from), _input_row_(from._input_row_) {
73 GUM_CONS_CPY(DBRowGenerator4CompleteRows);
77 DBRowGenerator4CompleteRows::DBRowGenerator4CompleteRows(DBRowGenerator4CompleteRows&& from) :
78 DBRowGenerator(
std::move(from)), _input_row_(from._input_row_) {
79 GUM_CONS_MOV(DBRowGenerator4CompleteRows);
83 DBRowGenerator4CompleteRows* DBRowGenerator4CompleteRows::clone()
const {
84 return new DBRowGenerator4CompleteRows(*
this);
88 DBRowGenerator4CompleteRows::~DBRowGenerator4CompleteRows() {
89 GUM_DESTRUCTOR(DBRowGenerator4CompleteRows);
93 DBRowGenerator4CompleteRows&
94 DBRowGenerator4CompleteRows::operator=(
const DBRowGenerator4CompleteRows& from) =
default;
97 DBRowGenerator4CompleteRows&
98 DBRowGenerator4CompleteRows::operator=(DBRowGenerator4CompleteRows&& from) {
99 DBRowGenerator::operator=(std::move(from));
100 _input_row_ = from._input_row_;
104 std::size_t DBRowGenerator4CompleteRows::computeRows_(
const DBRow< DBTranslatedValue >& row) {
106 const auto& xrow = row.row();
107 for (
const auto col: this->columns_of_interest_) {
108 switch (this->column_types_[col]) {
109 case DBTranslatedValueType::DISCRETE :
110 if (xrow[col].discr_val == std::numeric_limits< std::size_t >::max()) {
111 _input_row_ =
nullptr;
112 return std::size_t(0);
116 case DBTranslatedValueType::CONTINUOUS :
117 if (xrow[col].cont_val == std::numeric_limits< float >::max()) {
118 _input_row_ =
nullptr;
119 return std::size_t(0);
125 "DBTranslatedValueType " <<
int(this->column_types_[col])
126 <<
" is not supported yet");
130 return std::size_t(1);
A DBRowGenerator class that returns the rows that are complete (fully observed) w....
A DBRowGenerator class that returns the rows that are complete (fully observed) w....
Exception : there is something wrong with an implementation.
DBRowGenerator4CompleteRows(const std::vector< DBTranslatedValueType > &column_types)
default constructor
The base class for all DBRow generators.
#define GUM_ERROR(type, msg)
DBRowGeneratorGoal
the type of things that a DBRowGenerator is designed for
@ ONLY_REMOVE_MISSING_VALUES
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities