aGrUM
3.2.0
a C++ library for (probabilistic) graphical models
Toggle main menu visibility
IContinuousVariable.h
Go to the documentation of this file.
1
/****************************************************************************
2
* This file is part of the aGrUM/pyAgrum library. *
3
* *
4
* Copyright (c) 2005-2026 by *
5
* - Pierre-Henri WUILLEMIN(_at_LIP6) *
6
* - Christophe GONZALES(_at_AMU) *
7
* *
8
* The aGrUM/pyAgrum library is free software; you can redistribute it *
9
* and/or modify it under the terms of either : *
10
* *
11
* - the GNU Lesser General Public License as published by *
12
* the Free Software Foundation, either version 3 of the License, *
13
* or (at your option) any later version, *
14
* - the MIT license (MIT), *
15
* - or both in dual license, as here. *
16
* *
17
* (see https://agrum.gitlab.io/articles/dual-licenses-lgplv3mit.html) *
18
* *
19
* This aGrUM/pyAgrum library is distributed in the hope that it will be *
20
* useful, but WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
21
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES MERCHANTABILITY or FITNESS *
22
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
23
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
24
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
25
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
26
* OTHER DEALINGS IN THE SOFTWARE. *
27
* *
28
* See LICENCES for more details. *
29
* *
30
* SPDX-FileCopyrightText: Copyright 2005-2026 *
31
* - Pierre-Henri WUILLEMIN(_at_LIP6) *
32
* - Christophe GONZALES(_at_AMU) *
33
* SPDX-License-Identifier: LGPL-3.0-or-later OR MIT *
34
* *
35
* Contact : info_at_agrum_dot_org *
36
* homepage : http://agrum.gitlab.io *
37
* gitlab : https://gitlab.com/agrumery/agrum *
38
* *
39
****************************************************************************/
40
41
48
#ifndef GUM_I_CONTINUOUS_VARIABLE_H
49
#define GUM_I_CONTINUOUS_VARIABLE_H
50
51
#include <iostream>
52
#include <string>
53
54
#include <
agrum/agrum.h
>
55
56
#include <
agrum/base/variables/variable.h
>
57
58
namespace
gum
{
59
66
class
IContinuousVariable
:
public
Variable
{
67
public
:
68
// ############################################################################
70
// ############################################################################
72
74
IContinuousVariable
(std::string_view aName, std::string_view aDesc);
75
82
IContinuousVariable
(
const
IContinuousVariable
& from);
83
85
IContinuousVariable
(
IContinuousVariable
&& from);
86
88
~IContinuousVariable
()
override
;
89
91
[[nodiscard]]
IContinuousVariable
*
clone
()
const override
= 0;
92
94
95
96
// ############################################################################
98
// ############################################################################
100
102
virtual
double
lowerBoundAsDouble
()
const
= 0;
103
105
virtual
double
upperBoundAsDouble
()
const
= 0;
106
108
110
virtual
void
setLowerBoundFromDouble
(
const
double
new_bound) = 0;
111
113
115
virtual
void
setUpperBoundFromDouble
(
const
double
new_bound) = 0;
116
118
119
120
protected
:
122
IContinuousVariable
&
operator=
(
const
IContinuousVariable
& from);
123
125
IContinuousVariable
&
operator=
(
IContinuousVariable
&& from);
126
};
127
128
129
}
/* namespace gum */
130
131
132
#ifndef GUM_NO_INLINE
133
# include <
agrum/base/variables/IContinuousVariable_inl.h
>
134
#endif
/* GUM_NO_INLINE */
135
136
#endif
/* GUM_I_CONTINUOUS_VARIABLE_H */
IContinuousVariable_inl.h
Inline implementations of IContinuousVariable.
agrum.h
gum::IContinuousVariable::setLowerBoundFromDouble
virtual void setLowerBoundFromDouble(const double new_bound)=0
updates the lower bound of the domain of the variable
gum::IContinuousVariable::setUpperBoundFromDouble
virtual void setUpperBoundFromDouble(const double new_bound)=0
updates the lower bound of the domain of the variable
gum::IContinuousVariable::operator=
IContinuousVariable & operator=(IContinuousVariable &&from)
move operator
gum::IContinuousVariable::upperBoundAsDouble
virtual double upperBoundAsDouble() const =0
returns the upper bound of the domain of the variable as a double
gum::IContinuousVariable::IContinuousVariable
IContinuousVariable(IContinuousVariable &&from)
move constructor
gum::IContinuousVariable::IContinuousVariable
IContinuousVariable(std::string_view aName, std::string_view aDesc)
Default constructor.
gum::IContinuousVariable::lowerBoundAsDouble
virtual double lowerBoundAsDouble() const =0
returns the lower bound of the domain of the variable as a double
gum::IContinuousVariable::~IContinuousVariable
~IContinuousVariable() override
destructor
gum::IContinuousVariable::clone
IContinuousVariable * clone() const override=0
Copy Factory.
gum::IContinuousVariable::operator=
IContinuousVariable & operator=(const IContinuousVariable &from)
copy operator
gum::IContinuousVariable::IContinuousVariable
IContinuousVariable(const IContinuousVariable &from)
Copy Constructor.
gum::Variable::Variable
Variable()
(protected) Default constructor
Definition
variable.h:145
gum
gum is the global namespace for all aGrUM entities
Definition
agrum.h:46
variable.h
Base class for random variable.
aGrUM
3.2.0
© PHW&CG&others - 2022
DoXyGeN 1.18.0