aGrUM  0.16.0
DBTranslatedValue.h
Go to the documentation of this file.
1 
33 #ifndef GUM_LEARNING_DB_TRANSLATED_VALUE_H
34 #define GUM_LEARNING_DB_TRANSLATED_VALUE_H
35 
36 #include <cstddef>
37 #include <agrum/agrum.h>
38 
39 
40 namespace gum {
41 
42  namespace learning {
43 
71  std::size_t discr_val;
72 
74  float cont_val;
75 
76 
77  // ##########################################################################
79  // ##########################################################################
80 
82 
84  constexpr DBTranslatedValue() : discr_val{std::size_t(0)} {}
85 
87  constexpr DBTranslatedValue(const float& val) : cont_val{val} {}
88 
90  constexpr DBTranslatedValue(const std::size_t& val) : discr_val{val} {}
91 
94 
96  };
97 
98 
121  enum class DBTranslatedValueType : char { DISCRETE, CONTINUOUS };
122 
123 
124  } /* namespace learning */
125 
126 } /* namespace gum */
127 
128 #endif /* GUM_LEARNING_DB_TRANSLATED_VALUE_H */
std::size_t discr_val
the field for storing discrete values
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.
float cont_val
the field for storing continuous values
constexpr DBTranslatedValue()
default constructor: stores discrete value 0
DBTranslatedValueType
The nature of the elements handled by translators (discrete, continuous).
constexpr DBTranslatedValue(const std::size_t &val)
the constructor for storing a discrete value
constexpr DBTranslatedValue(const float &val)
the constructor for storing a continuous value