![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
A base class for continuous variables, independent of the GUM_SCALAR type. More...
#include <agrum/base/variables/IContinuousVariable.h>
Public Member Functions | |
Constructors / Destructors | |
| IContinuousVariable (const std::string &aName, const std::string &aDesc) | |
| Default constructor. | |
| IContinuousVariable (const IContinuousVariable &from) | |
| Copy Constructor. | |
| IContinuousVariable (IContinuousVariable &&from) | |
| move constructor | |
| virtual | ~IContinuousVariable () |
| destructor | |
| virtual IContinuousVariable * | clone () const =0 |
| Copy Factory. | |
Accessors / Modifiers | |
| virtual double | lowerBoundAsDouble () const =0 |
| returns the lower bound of the domain of the variable as a double | |
| virtual double | upperBoundAsDouble () const =0 |
| returns the upper bound of the domain of the variable as a double | |
| virtual void | setLowerBoundFromDouble (const double new_bound)=0 |
| updates the lower bound of the domain of the variable | |
| virtual void | setUpperBoundFromDouble (const double new_bound)=0 |
| updates the lower bound of the domain of the variable | |
Operators | |
| bool | operator== (const Variable &aRV) const |
| equality operator | |
Accessors / Modifiers | |
| void | setName (const std::string &theValue) |
| sets the name of the variable | |
| const std::string & | name () const |
| returns the name of the variable | |
| void | setDescription (const std::string &theValue) const |
| sets the description of the variable | |
| const std::string & | description () const |
| returns the description of the variable | |
| virtual VarType | varType () const =0 |
| returns the type of variable | |
| virtual std::string | domain () const =0 |
| string represent the domain of the variable | |
Protected Member Functions | |
| IContinuousVariable & | operator= (const IContinuousVariable &from) |
| copy operator | |
| IContinuousVariable & | operator= (IContinuousVariable &&from) |
| move operator | |
| void | copy_ (const Variable &aRV) |
| protected copy | |
Private Member Functions | |
| virtual bool | _checkSameDomain_ (const Variable &aRV) const =0 |
| check the domain | |
Private Attributes | |
| std::string | _name_ |
| the name of the variable | |
| std::string | _description_ |
| 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. | |
A base class for continuous variables, independent of the GUM_SCALAR type.
Definition at line 66 of file IContinuousVariable.h.
| gum::IContinuousVariable::IContinuousVariable | ( | const std::string & | aName, |
| const std::string & | aDesc ) |
Default constructor.
Referenced by IContinuousVariable(), IContinuousVariable(), clone(), operator=(), and operator=().
| gum::IContinuousVariable::IContinuousVariable | ( | const IContinuousVariable & | from | ) |
Copy Constructor.
If from has any listener, it will not be copied.
| from | the variable we copy |
References IContinuousVariable().
| gum::IContinuousVariable::IContinuousVariable | ( | IContinuousVariable && | from | ) |
|
virtual |
destructor
|
privatepure virtualinherited |
check the domain
this function use the assumption that the concrete type of the variable is the same as *this
Implemented in gum::ContinuousVariable< GUM_SCALAR >, gum::DiscretizedVariable< T_TICKS >, gum::IntegerVariable, gum::LabelizedVariable, gum::NumericalDiscreteVariable, and gum::RangeVariable.
References Variable().
|
pure virtual |
Copy Factory.
Implements gum::Variable.
Implemented in gum::ContinuousVariable< GUM_SCALAR >.
References IContinuousVariable().
|
protectedinherited |
protected copy
| aRV | to be copied |
References Variable().
|
inherited |
returns the description of the variable
|
pure virtualinherited |
string represent the domain of the variable
Implemented in gum::ContinuousVariable< GUM_SCALAR >, gum::DiscreteVariable, gum::DiscretizedVariable< T_TICKS >, gum::IntegerVariable, gum::LabelizedVariable, gum::NumericalDiscreteVariable, and gum::RangeVariable.
|
pure virtual |
returns the lower bound of the domain of the variable as a double
Implemented in gum::ContinuousVariable< GUM_SCALAR >.
|
inherited |
returns the name of the variable
Referenced by gum::learning::IBNLearner::Database::Database(), gum::Estimator< GUM_SCALAR >::Estimator(), gum::MultiDimImplementation< double >::MultiDimImplementation(), gum::NumericalDiscreteVariable::NumericalDiscreteVariable(), gum::BNdistance< GUM_SCALAR >::_checkCompatibility_(), gum::BayesNet< double >::_copyTensors_(), gum::prm::PRMFactory< GUM_SCALAR >::_retrieveCommonType_(), gum::prm::PRMFactory< GUM_SCALAR >::_retrieveInputs_(), gum::BayesNetFactory< GUM_SCALAR >::_setCPTAndParents_(), gum::Instantiation::add(), gum::FMDP< double >::addCostForAction(), gum::FMDP< GUM_SCALAR >::addVariable(), gum::MultiDimICIModel< GUM_SCALAR >::causalWeight(), gum::Instantiation::chgVal(), gum::GibbsBNdistance< GUM_SCALAR >::computeKL_(), gum::InfluenceDiagram< GUM_SCALAR >::copyStructureAndTables_(), gum::prm::PRMFactory< GUM_SCALAR >::endDiscreteType(), gum::prm::PRMFactory< GUM_SCALAR >::endDiscretizedType(), gum::BayesNetFactory< GUM_SCALAR >::endVariableDeclaration(), gum::FMDPFactory< GUM_SCALAR >::endVariableDeclaration(), gum::Tensor< GUM_SCALAR >::fillWith(), gum::BayesNetFragment< GUM_SCALAR >::nodeId(), gum::Estimator< GUM_SCALAR >::posterior(), gum::Estimator< GUM_SCALAR >::setFromBN(), gum::Instantiation::setValsFrom(), gum::BayesNetFactory< GUM_SCALAR >::setVariable(), gum::BayesNetFactory< GUM_SCALAR >::setVariableValuesUnchecked(), gum::MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >::toDot(), gum::RangeVariable::toFast(), gum::Estimator< GUM_SCALAR >::update(), and gum::MultiDimFunctionGraph< GUM_SCALAR, TerminalNodePolicy >::varNodeListe().
|
protected |
|
protected |
|
inherited |
sets the description of the variable
| theValue |
|
pure virtual |
updates the lower bound of the domain of the variable
| OutOfBounds | is raised if the new bound is higher than the current upper bound. |
Implemented in gum::ContinuousVariable< GUM_SCALAR >.
|
inherited |
sets the name of the variable
| theValue |
|
pure virtual |
updates the lower bound of the domain of the variable
| OutOfBounds | is raised if the new bound is lower than the current lower bound |
Implemented in gum::ContinuousVariable< GUM_SCALAR >.
|
pure virtual |
returns the upper bound of the domain of the variable as a double
Implemented in gum::ContinuousVariable< GUM_SCALAR >.
|
pure virtualinherited |
returns the type of variable
Implemented in gum::ContinuousVariable< GUM_SCALAR >, gum::DiscreteVariable, gum::DiscretizedVariable< T_TICKS >, gum::IntegerVariable, gum::LabelizedVariable, gum::NumericalDiscreteVariable, and gum::RangeVariable.
|
mutableprivateinherited |
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.
|
privateinherited |
the name of the variable
Definition at line 160 of file variable.h.