27 #ifndef GUM_INTEGER_DISCRETE_VARIABLE_H 28 #define GUM_INTEGER_DISCRETE_VARIABLE_H 34 #include <agrum/agrum.h> 36 #include <agrum/tools/core/sequence.h> 37 #include <agrum/tools/variables/discreteVariable.h> 47 class IntegerVariable:
public DiscreteVariable {
58 IntegerVariable(
const std::string& aName,
59 const std::string& aDesc =
"");
66 IntegerVariable(
const std::string& aName,
67 const std::string& aDesc,
68 const std::vector<
int >& domain);
74 IntegerVariable(
const IntegerVariable& from);
77 IntegerVariable(IntegerVariable&& from);
80 virtual IntegerVariable* clone()
const;
83 virtual ~IntegerVariable();
95 IntegerVariable& operator=(
const IntegerVariable& from);
99 IntegerVariable& operator=(IntegerVariable&& from);
102 virtual bool operator==(
const Variable& var)
const;
105 virtual bool operator!=(
const Variable& var)
const;
116 virtual Size domainSize()
const;
119 virtual VarType varType()
const;
125 virtual Idx index(
const std::string& label)
const;
128 virtual std::string label(Idx index)
const;
131 virtual double numerical(Idx index)
const;
134 virtual const std::string domain()
const;
137 const Sequence<
int >& integerDomain()
const;
143 IntegerVariable& addValue(
int value);
146 void changeValue(
int old_value,
int new_value);
149 void eraseValue(
int value);
158 Sequence<
int > _domain_;
164 #ifndef GUM_NO_INLINE 165 # include <agrum/tools/variables/integerVariable_inl.h>