29 #ifndef GUM_DISCRETE_VARIABLE_H 30 #define GUM_DISCRETE_VARIABLE_H 106 std::vector< std::string >
labels()
const;
147 virtual std::string
label(
Idx i)
const = 0;
156 virtual const std::string
domain()
const = 0;
169 #ifndef GUM_NO_INLINE std::vector< std::string > labels() const
vector of labels
Base class for every random variable.
DiscreteVariable & operator=(const DiscreteVariable &aRV)
Copy operator.
virtual double numerical(Idx indice) const =0
get a numerical representation of the indice-th value.
virtual const std::string domain() const =0
string represent the domain of the variable
virtual DiscreteVariable * clone() const =0
Copy Factory.
virtual VarType varType() const =0
returns the varType of variable
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Idx operator[](const std::string &label) const
from the label to its index in var.
Base class for discrete random variable.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual bool operator==(const DiscreteVariable &aRV) const
equality operator
const std::string toStringWithDescription() const
string version of *this using description attribute instead of name.
virtual Size domainSize() const =0
std::ostream & operator<<(std::ostream &output, const BayesNet< GUM_SCALAR > &bn)
Prints map's DAG in output using the Graphviz-dot format.
virtual std::string label(Idx i) const =0
get the indice-th label. This method is pure virtual.
virtual bool operator!=(const DiscreteVariable &aRV) const
inequality operator
virtual Idx index(const std::string &label) const =0
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual ~DiscreteVariable()
destructor
DiscreteVariable()
(protected) Default constructor
const std::string toString() const
string version of *this
Size Idx
Type for indexes.
std::size_t Size
In aGrUM, hashed values are unsigned long int.