aGrUM  0.13.2
gum::Variable Class Referenceabstract

Base class for every random variable. More...

#include <variable.h>

+ Inheritance diagram for gum::Variable:

Public Member Functions

Constructors / Destructors
virtual ~Variable ()
 destructor More...
 
virtual Variableclone () const =0
 Copy Factory. More...
 
Operators
Variableoperator= (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...
 

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...
 

Detailed Description

Base class for every random variable.

Definition at line 63 of file variable.h.

Constructor & Destructor Documentation

virtual gum::Variable::~Variable ( )
virtual

destructor

gum::Variable::Variable ( )
inlineprotected

(protected) Default constructor

Definition at line 135 of file variable.h.

135 { GUM_CONSTRUCTOR(Variable); };
Variable()
(protected) Default constructor
Definition: variable.h:135
gum::Variable::Variable ( const std::string &  aName,
const std::string &  aDesc 
)
protected

constructor

Parameters
aNamename of the variable
aDescdescription of the variable
gum::Variable::Variable ( const Variable aRV)
protected

copy constructor

Parameters
aRVthe variable we copy

Member Function Documentation

void gum::Variable::_copy ( const Variable aRV)
protected

protected copy

Parameters
aRVto be copied
virtual Variable* gum::Variable::clone ( ) const
pure virtual
const std::string& gum::Variable::description ( ) const

returns the description of the variable

const std::string& gum::Variable::name ( ) const

returns the name of the variable

Referenced by gum::KL< GUM_SCALAR >::__checkCompatibility(), gum::BayesNetFactory< GUM_SCALAR >::__setCPTAndParents(), gum::GibbsKL< GUM_SCALAR >::_computeKL(), gum::MultiDimImplementation< GUM_SCALAR >::add(), gum::Instantiation::add(), gum::FMDP< GUM_SCALAR >::addTransitionForAction(), gum::FMDP< GUM_SCALAR >::addVariable(), gum::MultiDimICIModel< GUM_SCALAR >::causalWeight(), gum::Instantiation::chgVal(), gum::learning::genericBNLearner::Database::Database(), gum::FMDPFactory< GUM_SCALAR >::endVariableDeclaration(), gum::BayesNetFactory< GUM_SCALAR >::endVariableDeclaration(), gum::MarkovBlanket::hasSameStructure(), gum::BayesNetFragment< GUM_SCALAR >::nodeId(), gum::StructuredPlaner< GUM_SCALAR >::optimalPolicy2String(), gum::Estimator< GUM_SCALAR >::posterior(), 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::IBayesNet< GUM_SCALAR >::toDot(), gum::MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >::toDot(), gum::Estimator< GUM_SCALAR >::update(), and gum::MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >::varNodeListe().

+ Here is the caller graph for this function:

virtual bool gum::Variable::operator!= ( const Variable aRV) const
virtual

inequality operator

Variable& gum::Variable::operator= ( const Variable aRV)

Copy operator.

Parameters
aRVto be copied
Returns
a const ref to *this
virtual bool gum::Variable::operator== ( const Variable aRV) const
virtual

equality operator

void gum::Variable::setDescription ( const std::string &  theValue) const

sets the description of the variable

Warning
since __description is mutable, setDescription() is const
Parameters
theValue
void gum::Variable::setName ( const std::string &  theValue)

sets the name of the variable

Parameters
theValue

Referenced by gum::prm::PRMSystem< GUM_SCALAR >::__groundAttr(), gum::FMDP< GUM_SCALAR >::addVariable(), and gum::TaxiSimulator::TaxiSimulator().

+ Here is the caller graph for this function:

virtual VarType gum::Variable::varType ( ) const
pure virtual

Member Data Documentation

std::string gum::Variable::__description
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 160 of file variable.h.

std::string gum::Variable::__name
private

the name of the variable

Definition at line 155 of file variable.h.


The documentation for this class was generated from the following file: