32 #endif // GUM_NO_INLINE 40 const void* address =
static_cast< const void*
>(
this);
42 ss << this->
name() <<
"-" << address;
105 if ((*
this) == super) {
120 if (
__label_map->at(i) >= (**__superType).domainSize()) {
return false; }
void setName(const std::string &theValue)
sets the name of the variable
const std::string & name() const
Returns the name of this object.
Inline implementation of type.
PRMType * __superType
The super type of this, if any.
PRMType(const DiscreteVariable &var)
Default Constructor.
virtual ~PRMType()
Destructor.
Base class for discrete random variable.
gum is the global namespace for all aGrUM entities
DiscreteVariable * __var
The discrete variable.
void __updateName()
Used at construction to set a unique name to this class underlying DiscreteVariable.
virtual Size domainSize() const =0
std::vector< Idx > * __label_map
A vector in which the i-th element is the Idx of the super type's label for the i-th label of this...
This is a decoration of the DiscreteVariable class.
Abstract base class for any element defined in a PRM.
const std::vector< Idx > & label_map() const
Returns the vector in which the i-th element is the Idx of the super type's label for the i-th label ...
Size Idx
Type for indexes.
PRMType & operator=(const PRMType &from)
Copy operator.
bool __isValid() const
Returns true if this is a valid type or subtype.
bool isSubTypeOf(const PRMType &super) const
Returns true if this is a subtype of super.
#define GUM_ERROR(type, msg)