![]() |
aGrUM
0.16.0
|
Base class for every random variable. More...
#include <variable.h>
Public Member Functions | |
Constructors / Destructors | |
virtual | ~Variable () |
destructor More... | |
virtual Variable * | clone () const =0 |
Copy Factory. More... | |
Operators | |
Variable & | operator= (const Variable &aRV) |
Copy operator. More... | |
virtual bool | operator== (const Variable &aRV) const |
equality operator More... | |
virtual bool | operator!= (const Variable &aRV) const |
inequality operator More... | |
Accessors / Modifiers | |
void | setName (const std::string &theValue) |
sets the name of the variable More... | |
const std::string & | name () const |
returns the name of the variable More... | |
void | setDescription (const std::string &theValue) const |
sets the description of the variable More... | |
const std::string & | description () const |
returns the description of the variable More... | |
virtual VarType | varType () const =0 |
returns the type of variable More... | |
virtual const std::string | domain () const =0 |
string represent the domain of the variable More... | |
Protected Member Functions | |
Variable () | |
(protected) Default constructor More... | |
void | _copy (const Variable &aRV) |
protected copy More... | |
Variable (const std::string &aName, const std::string &aDesc) | |
constructor More... | |
Variable (const Variable &aRV) | |
copy constructor More... | |
Base class for every random variable.
Definition at line 66 of file variable.h.
|
virtual |
destructor
|
inlineprotected |
|
protected |
constructor
aName | name of the variable |
aDesc | description of the variable |
|
protected |
copy constructor
aRV | the variable we copy |
|
protected |
protected copy
aRV | to be copied |
|
pure virtual |
Copy Factory.
Implemented in gum::DiscretizedVariable< T_TICKS >, gum::LabelizedVariable, gum::DiscreteVariable, gum::RangeVariable, gum::ContinuousVariable< GUM_SCALAR >, gum::IContinuousVariable, and gum::IDiscretizedVariable.
const std::string& gum::Variable::description | ( | ) | const |
returns the description of the variable
|
pure virtual |
string represent the domain of the variable
Implemented in gum::DiscretizedVariable< T_TICKS >, gum::LabelizedVariable, gum::ContinuousVariable< GUM_SCALAR >, gum::DiscreteVariable, and gum::RangeVariable.
const std::string& gum::Variable::name | ( | ) | const |
returns the name of the variable
Referenced by gum::BNdistance< GUM_SCALAR >::__checkCompatibility(), gum::prm::PRMFactory< GUM_SCALAR >::__retrieveCommonType(), gum::prm::PRMFactory< GUM_SCALAR >::__retrieveInputs(), gum::BayesNetFactory< GUM_SCALAR >::__setCPTAndParents(), gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), gum::MultiDimImplementation< std::string >::add(), gum::Instantiation::add(), gum::FMDP< double >::addTransitionForAction(), gum::FMDP< double >::addVariable(), gum::MultiDimICIModel< GUM_SCALAR >::causalWeight(), gum::Instantiation::chgVal(), gum::learning::genericBNLearner::Database::Database(), gum::prm::PRMFactory< GUM_SCALAR >::endDiscreteType(), gum::prm::PRMFactory< GUM_SCALAR >::endDiscretizedType(), gum::FMDPFactory< GUM_SCALAR >::endVariableDeclaration(), gum::BayesNetFactory< GUM_SCALAR >::endVariableDeclaration(), gum::MarkovBlanket::hasSameStructure(), gum::BayesNetFragment< GUM_SCALAR >::nodeId(), gum::StructuredPlaner< double >::optimalPolicy2String(), gum::Estimator< GUM_SCALAR >::posterior(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::PRMScalarAttribute(), gum::Instantiation::setValsFrom(), gum::BayesNetFactory< GUM_SCALAR >::setVariable(), gum::BayesNetFactory< GUM_SCALAR >::setVariableValues(), gum::BayesNetFactory< GUM_SCALAR >::setVariableValuesUnchecked(), gum::MarkovBlanket::toDot(), gum::EssentialGraph::toDot(), gum::InfluenceDiagram< GUM_SCALAR >::toDot(), gum::prm::InstanceBayesNet< GUM_SCALAR >::toDot(), gum::prm::ClassBayesNet< GUM_SCALAR >::toDot(), gum::MultiDimFunctionGraph< bool, ExactTerminalNodePolicy >::toDot(), gum::Estimator< GUM_SCALAR >::update(), and gum::MultiDimFunctionGraph< bool, ExactTerminalNodePolicy >::varNodeListe().
Copy operator.
aRV | to be copied |
void gum::Variable::setDescription | ( | const std::string & | theValue | ) | const |
sets the description of the variable
theValue |
void gum::Variable::setName | ( | const std::string & | theValue | ) |
sets the name of the variable
theValue |
Referenced by gum::prm::PRMSystem< double >::__groundAttr(), gum::prm::PRMType::__updateName(), gum::FMDP< double >::addVariable(), and gum::TaxiSimulator::TaxiSimulator().
|
pure virtual |
returns the type of variable
Implemented in gum::ContinuousVariable< GUM_SCALAR >, gum::LabelizedVariable, gum::DiscretizedVariable< T_TICKS >, gum::DiscreteVariable, and gum::RangeVariable.
|
mutableprivate |
the description of the variable since description is not a characteristic of a variable, we allow the description to be changed even in a const reference.
Definition at line 165 of file variable.h.
|
private |
the name of the variable
Definition at line 160 of file variable.h.