49#ifndef GUM_RANGE_VARIABLE_H
50#define GUM_RANGE_VARIABLE_H
81 RangeVariable(std::string_view aName, std::string_view aDesc);
116 std::string
toFast()
const final;
157 Idx index(std::string_view)
const final;
174 std::string
domain() const final;
DiscreteVariable(std::string_view aName, std::string_view aDesc)
Default constructor.
void setMaxVal(long maxVal)
Set a new value of the upper bound.
RangeVariable * clone() const final
Copy Factory.
Idx closestIndex(double val) const final
returns the closest index of the value
std::string label(Idx index) const final
Get the index-th label.
long maxVal() const
Returns the upper bound.
long _minBound_
The upper bound.
bool belongs(long val) const
Returns true if the param belongs to the variable's interval.
bool _checkSameDomain_(const Variable &aRV) const final
check the domain
void setMinVal(long minVal)
Set a new value for the lower bound.
Size domainSize() const final
returns the size of the random discrete variable domain
VarType varType() const final
returns the type of variable
std::string toFast() const final
returns the size of the random discrete variable domain
RangeVariable & operator=(const RangeVariable &aRV)
Copy operator.
double numerical(Idx index) const final
get a numerical representation of the index-the value.
std::string stype() const final
string represent the type of the variable
std::string domain() const final
string represent the domain of the variable
long minVal() const
Returns the lower bound.
~RangeVariable() final
destructor
RangeVariable(std::string_view aName, std::string_view aDesc, long minVal, long maxVal)
constructors
long _maxBound_
The upper bound.
Idx index(std::string_view) const final
Base class for every random variable.
Base class for discrete random variable.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size Idx
Type for indexes.
gum is the global namespace for all aGrUM entities
Inline implementation of gumRangeVariable.