30 #ifndef GUM_RANGE_VARIABLE_H 31 #define GUM_RANGE_VARIABLE_H 61 const std::string& aDesc,
66 RangeVariable(
const std::string& aName,
const std::string& aDesc);
106 virtual std::string
label(
Idx indice)
const;
140 virtual Idx index(
const std::string&)
const;
154 virtual const std::string
domain()
const;
171 #ifndef GUM_NO_INLINE bool belongs(long val) const
Returns true if the param belongs to the variable's interval.
long __maxBound
The upper bound.
virtual Idx index(const std::string &) const
virtual std::string label(Idx indice) const
Get the indice-th label.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
RangeVariable & operator=(const RangeVariable &aRV)
Copy operator.
virtual Size domainSize() const
returns the size of the random discrete variable domain
virtual double numerical(Idx indice) const
get a numerical representation of he indice-the value.
long minVal() const
Returns the lower bound.
void setMinVal(long minVal)
Set a new value for the lower bound.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Base class for discrete random variable.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual VarType varType() const
returns the type of variable
virtual ~RangeVariable()
destructor
virtual DiscreteVariable * clone() const
Copy Factory.
void setMaxVal(long maxVal)
Set a new value of the upper bound.
long maxVal() const
Returns the upper bound.
Defines a discrete random variable over an integer interval.
RangeVariable(const std::string &aName, const std::string &aDesc, long minVal, long maxVal)
constructors
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Size Idx
Type for indexes.
long __minBound
The lower bound.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
virtual const std::string domain() const
string represent the domain of the variable