30 #ifndef GUM_RANDOM_VARIABLE_TYPE_H 31 #define GUM_RANDOM_VARIABLE_TYPE_H 49 template <
typename GUM_SCALAR >
70 template <
typename GUM_SCALAR >
181 const std::string&
name()
const;
236 const std::vector< Idx >&
label_map()
const;
292 #ifndef GUM_NO_INLINE 294 #endif // GUM_NO_INLINE const std::string & name() const
Returns the name of this object.
PRMType & superType()
Returns the super type of this type.
void setSuper(PRMType &t)
Changes the PRMType of this PRMType super.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
PRMType * __superType
The super type of this, if any.
DiscreteVariable & variable()
Return a reference on the DiscreteVariable contained in this.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
PRMType(const DiscreteVariable &var)
Default Constructor.
virtual ~PRMType()
Destructor.
bool isSuperTypeOf(const PRMType &t) const
Returns true if this is a super type of t.
Base class for discrete random variable.
bool operator!=(const PRMObject &from) const
Difference operator.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
DiscreteVariable * __var
The discrete variable.
bool operator==(const PRMObject &from) const
Equality operator.
void __updateName()
Used at construction to set a unique name to this class underlying DiscreteVariable.
DiscreteVariable * operator->()
Dereference the DiscreteVariable contained in this.
prm_type
Enumeration of the different types of objects handled by a PRM.
virtual prm_type obj_type() const
Implementation of the pure virtual method of PRMObject.
Factory which builds a PRM<GUM_SCALAR>.
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.
static PRMType * boolean()
Returns a pointer on type boolean.
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 ...
PRMType & operator=(const PRMType &from)
Copy operator.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
DiscreteVariable & operator*()
Indirection on the DiscreteVariable contained in this.
bool isSubType() const
Returns true if this type is a sub-type.
bool __isValid() const
Returns true if this is a valid type or subtype.
LabelizedVariable & addLabel(const std::string &aLabel)
add a label with a new index (we assume that we will NEVER remove a label)
bool isSubTypeOf(const PRMType &super) const
Returns true if this is a subtype of super.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.