48#ifndef GUM_CONTINUOUS_VARIABLE_H
49#define GUM_CONTINUOUS_VARIABLE_H
68 template < GUM_Numeric GUM_SCALAR =
float >
82 std::string_view aDesc,
83 GUM_SCALAR lower_bound = -std::numeric_limits< GUM_SCALAR >::infinity(),
84 GUM_SCALAR upper_bound = std::numeric_limits< GUM_SCALAR >::infinity());
90 template <
typename TX_VAL >
116 template <
typename TX_VAL >
175 virtual std::string
label(
const GUM_SCALAR& value)
const;
213 template < typename T_VAL >
228#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.
GUM_SCALAR upperBound() const
returns the upper bound of the domain of the variable
ContinuousVariable(const ContinuousVariable< GUM_SCALAR > &from)
Copy Constructor.
ContinuousVariable< GUM_SCALAR > * clone() const override
Copy Factory.
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
void setLowerBoundFromDouble(const double new_bound) override
updates the lower bound of the domain of the variable
GUM_SCALAR lowerBound() const
returns the lower bound of the domain of the variable
ContinuousVariable(const ContinuousVariable< TX_VAL > &from)
generalized copy constructor
ContinuousVariable< GUM_SCALAR > & operator=(ContinuousVariable< GUM_SCALAR > &&from)
move operator
VarType varType() const override
returns the type of the variable
ContinuousVariable< GUM_SCALAR > & operator=(const ContinuousVariable< GUM_SCALAR > &from)
copy operator
bool _checkSameDomain_(const Variable &aRV) const final
check the domain
double upperBoundAsDouble() const override
returns the upper bound of the domain of the variable as a double
ContinuousVariable(std::string_view aName, std::string_view aDesc, GUM_SCALAR lower_bound=-std::numeric_limits< GUM_SCALAR >::infinity(), GUM_SCALAR upper_bound=std::numeric_limits< GUM_SCALAR >::infinity())
Default constructor.
ContinuousVariable< GUM_SCALAR > & operator=(const ContinuousVariable< TX_VAL > &from)
generalized copy operator
double lowerBoundAsDouble() const override
returns the lower bound of the domain of the variable as a double
~ContinuousVariable() override
destructor
ContinuousVariable(ContinuousVariable< GUM_SCALAR > &&from)
move constructor
friend class ContinuousVariable
GUM_SCALAR operator[](std::string_view str) const
returns the T_VAL corresponding to a string
void setUpperBoundFromDouble(const double new_bound) override
updates the lower bound of the domain of the variable
IContinuousVariable(std::string_view aName, std::string_view aDesc)
Default constructor.
Base class for every random variable.
Complete concept for GUM_SCALAR template parameter.
The databases' cell translators for continuous variables.
gum is the global namespace for all aGrUM entities