aGrUM
0.20.2
a C++ library for (probabilistic) graphical models
localSearchWithTabuList_inl.h
Go to the documentation of this file.
1
/**
2
*
3
* Copyright 2005-2020 Pierre-Henri WUILLEMIN(@LIP6) & Christophe GONZALES(@AMU)
4
* info_at_agrum_dot_org
5
*
6
* This library is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with this library. If not, see <http://www.gnu.org/licenses/>.
18
*
19
*/
20
21
22
/** @file
23
* @brief The local search learning algorithm (for directed graphs)
24
*
25
* @author Christophe GONZALES(@AMU) and Pierre-Henri WUILLEMIN(@LIP6)
26
*/
27
#
ifndef
DOXYGEN_SHOULD_SKIP_THIS
28
29
namespace
gum
{
30
31
namespace
learning
{
32
33
/// default constructor
34
INLINE
LocalSearchWithTabuList
::
LocalSearchWithTabuList
() {
35
disableEpsilon
();
36
disableMinEpsilonRate
();
37
disableMaxIter
();
38
disableMaxTime
();
39
GUM_CONSTRUCTOR
(
LocalSearchWithTabuList
);
40
}
41
42
/// copy constructor
43
INLINE
LocalSearchWithTabuList
::
LocalSearchWithTabuList
(
44
const
LocalSearchWithTabuList
&
from
) :
45
ApproximationScheme
(
from
),
46
MaxNbDecreasing__
(
from
.
MaxNbDecreasing__
) {
47
GUM_CONS_CPY
(
LocalSearchWithTabuList
);
48
}
49
50
/// move constructor
51
INLINE
52
LocalSearchWithTabuList
::
LocalSearchWithTabuList
(
53
LocalSearchWithTabuList
&&
from
) :
54
ApproximationScheme
(
std
::
move
(
from
)),
55
MaxNbDecreasing__
(
std
::
move
(
from
.
MaxNbDecreasing__
)) {
56
GUM_CONS_MOV
(
LocalSearchWithTabuList
);
57
}
58
59
/// destructor
60
INLINE
LocalSearchWithTabuList
::~
LocalSearchWithTabuList
() {
61
GUM_DESTRUCTOR
(
LocalSearchWithTabuList
);
62
}
63
64
/// copy operator
65
INLINE LocalSearchWithTabuList&
66
LocalSearchWithTabuList
::
operator
=(
const
LocalSearchWithTabuList
&
from
) {
67
ApproximationScheme
::
operator
=(
from
);
68
MaxNbDecreasing__
=
from
.
MaxNbDecreasing__
;
69
return
*
this
;
70
}
71
72
/// move operator
73
INLINE
LocalSearchWithTabuList
&
74
LocalSearchWithTabuList
::
operator
=(
LocalSearchWithTabuList
&&
from
) {
75
ApproximationScheme
::
operator
=(
std
::
move
(
from
));
76
MaxNbDecreasing__
=
std
::
move
(
from
.
MaxNbDecreasing__
);
77
return
*
this
;
78
}
79
80
/// set the max number of changes decreasing the score that we allow to
81
/// apply
82
INLINE
void
LocalSearchWithTabuList
::
setMaxNbDecreasingChanges
(
Size
nb
) {
83
MaxNbDecreasing__
=
nb
;
84
}
85
86
/// returns the approximation policy of the learning algorithm
87
INLINE
ApproximationScheme
&
LocalSearchWithTabuList
::
approximationScheme
() {
88
return
*
this
;
89
}
90
91
}
/* namespace learning */
92
93
}
/* namespace gum */
94
95
#
endif
/* DOXYGEN_SHOULD_SKIP_THIS */
gum::Set::emplace
INLINE void emplace(Args &&... args)
Definition:
set_tpl.h:669
gum::learning::genericBNLearner::Database::Database
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)
Definition:
genericBNLearner_tpl.h:31