aGrUM  0.16.0
gum::IContinuousVariable Class Referenceabstract

A base class for continuous variables, independent of the GUM_SCALAR type. More...

#include <agrum/variables/IContinuousVariable.h>

+ Inheritance diagram for gum::IContinuousVariable:
+ Collaboration diagram for gum::IContinuousVariable:

Public Member Functions

Constructors / Destructors
 IContinuousVariable (const std::string &aName, const std::string &aDesc)
 Default constructor. More...
 
 IContinuousVariable (const IContinuousVariable &from)
 Copy Constructor. More...
 
 IContinuousVariable (IContinuousVariable &&from)
 move constructor More...
 
virtual ~IContinuousVariable ()
 destructor More...
 
virtual IContinuousVariableclone () const =0
 Copy Factory. More...
 
Accessors / Modifiers
virtual double lowerBoundAsDouble () const =0
 returns the lower bound of the domain of the variable as a double More...
 
virtual double upperBoundAsDouble () const =0
 returns the upper bound of the domain of the variable as a double More...
 
virtual void setLowerBoundFromDouble (const double new_bound)=0
 updates the lower bound of the domain of the variable More...
 
virtual void setUpperBoundFromDouble (const double new_bound)=0
 updates the lower bound of the domain of the variable More...
 
Operators
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

IContinuousVariableoperator= (const IContinuousVariable &from)
 copy operator More...
 
IContinuousVariableoperator= (IContinuousVariable &&from)
 move operator More...
 
void _copy (const Variable &aRV)
 protected copy More...
 

Detailed Description

A base class for continuous variables, independent of the GUM_SCALAR type.

Definition at line 46 of file IContinuousVariable.h.

Constructor & Destructor Documentation

◆ IContinuousVariable() [1/3]

gum::IContinuousVariable::IContinuousVariable ( const std::string &  aName,
const std::string &  aDesc 
)

Default constructor.

◆ IContinuousVariable() [2/3]

gum::IContinuousVariable::IContinuousVariable ( const IContinuousVariable from)

Copy Constructor.

If from has any listener, it will not be copied.

Parameters
fromthe variable we copy

◆ IContinuousVariable() [3/3]

gum::IContinuousVariable::IContinuousVariable ( IContinuousVariable &&  from)

move constructor

◆ ~IContinuousVariable()

virtual gum::IContinuousVariable::~IContinuousVariable ( )
virtual

destructor

Member Function Documentation

◆ _copy()

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

protected copy

Parameters
aRVto be copied

◆ clone()

virtual IContinuousVariable* gum::IContinuousVariable::clone ( ) const
pure virtual

Copy Factory.

Implements gum::Variable.

Implemented in gum::ContinuousVariable< GUM_SCALAR >.

◆ description()

const std::string& gum::Variable::description ( ) const
inherited

returns the description of the variable

◆ domain()

virtual const std::string gum::Variable::domain ( ) const
pure virtualinherited

◆ lowerBoundAsDouble()

virtual double gum::IContinuousVariable::lowerBoundAsDouble ( ) const
pure virtual

returns the lower bound of the domain of the variable as a double

Implemented in gum::ContinuousVariable< GUM_SCALAR >.

◆ name()

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

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

◆ operator!=()

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

inequality operator

◆ operator=() [1/2]

IContinuousVariable& gum::IContinuousVariable::operator= ( const IContinuousVariable from)
protected

copy operator

◆ operator=() [2/2]

IContinuousVariable& gum::IContinuousVariable::operator= ( IContinuousVariable &&  from)
protected

move operator

◆ operator==()

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

equality operator

◆ setDescription()

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

sets the description of the variable

Warning
since __description is mutable, setDescription() is const
Parameters
theValue

◆ setLowerBoundFromDouble()

virtual void gum::IContinuousVariable::setLowerBoundFromDouble ( const double  new_bound)
pure virtual

updates the lower bound of the domain of the variable

Exceptions
OutOfBoundsis raised if the new bound is higher than the current upper bound.

Implemented in gum::ContinuousVariable< GUM_SCALAR >.

◆ setName()

void gum::Variable::setName ( const std::string &  theValue)
inherited

sets the name of the variable

Parameters
theValue

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

+ Here is the caller graph for this function:

◆ setUpperBoundFromDouble()

virtual void gum::IContinuousVariable::setUpperBoundFromDouble ( const double  new_bound)
pure virtual

updates the lower bound of the domain of the variable

Exceptions
OutOfBoundsis raised if the new bound is lower than the current lower bound

Implemented in gum::ContinuousVariable< GUM_SCALAR >.

◆ upperBoundAsDouble()

virtual double gum::IContinuousVariable::upperBoundAsDouble ( ) const
pure virtual

returns the upper bound of the domain of the variable as a double

Implemented in gum::ContinuousVariable< GUM_SCALAR >.

◆ varType()

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

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