27 #ifndef GUM_RANGE_VARIABLE_H 28 #define GUM_RANGE_VARIABLE_H 58 const std::string& aDesc,
100 virtual std::string
label(
Idx indice)
const;
134 virtual Idx index(
const std::string&)
const;
148 virtual const std::string
domain()
const;
165 #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.
Base class for discrete random variable.
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.
Classes providing basic hash functions for hash tables.
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 ~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.
Inline implementation of gumRangeVariable.
RangeVariable(const std::string &aName, const std::string &aDesc, long minVal=0, long maxVal=1)
Default constructor.
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