48 long target =
static_cast< long >(indice) +
__minBound;
50 std::stringstream strBuff;
65 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.
gum is the global namespace for all aGrUM entities
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=0, long maxVal=1)
Default constructor.
Header of gumRangeVariable.
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)