48#ifndef GUM_CONTINUOUS_VARIABLE_H
49#define GUM_CONTINUOUS_VARIABLE_H
66 template <
typename GUM_SCALAR =
float >
80 const std::string& aDesc,
81 GUM_SCALAR lower_bound = -std::numeric_limits< GUM_SCALAR >::infinity(),
82 GUM_SCALAR upper_bound = std::numeric_limits< GUM_SCALAR >::infinity());
88 template <
typename TX_VAL >
114 template <
typename TX_VAL >
173 virtual std::string
label(
const GUM_SCALAR& value)
const;
206 template < typename TX_VAL >
211 template < typename T_VAL >
226#include <agrum/base/variables/continuousVariable_tpl.h>
Header of IContinuousVariable.
Defines a continuous random variable.
std::string domain() const final
returns the domain of the variable as a string
void setLowerBound(const GUM_SCALAR &new_bound)
updates the lower bound of the domain of the variable
std::string toStringWithDescription() const
string version of *this using description attribute instead of name.
bool belongs(const GUM_SCALAR &value) const
Returns true if the param belongs to the domain of the variable.
virtual VarType varType() const
returns the type of the variable
virtual double lowerBoundAsDouble() const
returns the lower bound of the domain of the variable as a double
GUM_SCALAR upperBound() const
returns the upper bound of the domain of the variable
ContinuousVariable(const ContinuousVariable< GUM_SCALAR > &from)
Copy Constructor.
virtual std::string label(const GUM_SCALAR &value) const
returns a string containing the value of the variable passed in argument
std::string toString() const
string version of *this
void setUpperBound(const GUM_SCALAR &new_bound)
updates the lower bound of the domain of the variable
GUM_SCALAR operator[](const std::string &str) const
returns the T_VAL corresponding to a string
ContinuousVariable(const std::string &aName, const std::string &aDesc, GUM_SCALAR lower_bound=-std::numeric_limits< GUM_SCALAR >::infinity(), GUM_SCALAR upper_bound=std::numeric_limits< GUM_SCALAR >::infinity())
Default constructor.
GUM_SCALAR lowerBound() const
returns the lower bound of the domain of the variable
ContinuousVariable(const ContinuousVariable< TX_VAL > &from)
generalized copy constructor
virtual void setUpperBoundFromDouble(const double new_bound)
updates the lower bound of the domain of the variable
ContinuousVariable< GUM_SCALAR > & operator=(ContinuousVariable< GUM_SCALAR > &&from)
move operator
virtual void setLowerBoundFromDouble(const double new_bound)
updates the lower bound of the domain of the variable
virtual ~ContinuousVariable()
destructor
ContinuousVariable< GUM_SCALAR > & operator=(const ContinuousVariable< GUM_SCALAR > &from)
copy operator
bool _checkSameDomain_(const Variable &aRV) const final
check the domain
virtual ContinuousVariable< GUM_SCALAR > * clone() const
Copy Factory.
ContinuousVariable< GUM_SCALAR > & operator=(const ContinuousVariable< TX_VAL > &from)
generalized copy operator
ContinuousVariable(ContinuousVariable< GUM_SCALAR > &&from)
move constructor
friend class ContinuousVariable
virtual double upperBoundAsDouble() const
returns the upper bound of the domain of the variable as a double
IContinuousVariable(const std::string &aName, const std::string &aDesc)
Default constructor.
Base class for every random variable.
The databases' cell translators for continuous variables.
gum is the global namespace for all aGrUM entities