aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
gum::IContinuousVariable Class Referenceabstract

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

#include <agrum/tools/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 45 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

◆ clone()

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

Copy Factory.

Implements gum::Variable.

Implemented in gum::ContinuousVariable< GUM_SCALAR >.

◆ copy_()

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

protected copy

Parameters
aRVto be copied

◆ 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

◆ 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

◆ 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: