51 long target =
static_cast< long >(indice) +
__minBound;
53 std::stringstream strBuff;
68 std::istringstream i(label);
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.
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.
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 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.
#define GUM_ERROR(type, msg)