aGrUM  0.14.2
IContinuousVariable.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Pierre-Henri WUILLEMIN et Christophe GONZALES *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
26 #ifndef GUM_I_CONTINUOUS_VARIABLE_H
27 #define GUM_I_CONTINUOUS_VARIABLE_H
28 
29 #include <iostream>
30 #include <string>
31 
32 #include <agrum/agrum.h>
34 
35 namespace gum {
36 
43  class IContinuousVariable : public Variable {
44  public:
45  // ############################################################################
47  // ############################################################################
49 
51  IContinuousVariable(const std::string& aName, const std::string& aDesc);
52 
60 
63 
65  virtual ~IContinuousVariable();
66 
68  virtual IContinuousVariable* clone() const = 0;
69 
71 
72 
73  // ############################################################################
75  // ############################################################################
77 
79  virtual double lowerBoundAsDouble() const = 0;
80 
82  virtual double upperBoundAsDouble() const = 0;
83 
85 
87  virtual void setLowerBoundFromDouble(const double new_bound) = 0;
88 
90 
92  virtual void setUpperBoundFromDouble(const double new_bound) = 0;
93 
95 
96 
97  protected:
100 
103  };
104 
105 
106 } /* namespace gum */
107 
108 
109 #ifndef GUM_NO_INLINE
111 #endif /* GUM_NO_INLINE */
112 
113 #endif /* GUM_I_CONTINUOUS_VARIABLE_H */
virtual void setLowerBoundFromDouble(const double new_bound)=0
updates the lower bound of the domain of the variable
Base class for every random variable.
Definition: variable.h:63
IContinuousVariable & operator=(const IContinuousVariable &from)
copy operator
virtual IContinuousVariable * clone() const =0
Copy Factory.
A base class for continuous variables, independent of the GUM_SCALAR type.
virtual double lowerBoundAsDouble() const =0
returns the lower bound of the domain of the variable as a double
virtual void setUpperBoundFromDouble(const double new_bound)=0
updates the lower bound of the domain of the variable
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
virtual double upperBoundAsDouble() const =0
returns the upper bound of the domain of the variable as a double
virtual ~IContinuousVariable()
destructor
IContinuousVariable(const std::string &aName, const std::string &aDesc)
Default constructor.
Inline implementations of IContinuousVariable.
Base class for random variable.