aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
localSearchWithTabuList_inl.h
Go to the documentation of this file.
1
/**
2
*
3
* Copyright (c) 2005-2021 by 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
(
const
LocalSearchWithTabuList
&
from
) :
44
ApproximationScheme
(
from
),
_MaxNbDecreasing_
(
from
.
_MaxNbDecreasing_
) {
45
GUM_CONS_CPY
(
LocalSearchWithTabuList
);
46
}
47
48
/// move constructor
49
INLINE
LocalSearchWithTabuList
::
LocalSearchWithTabuList
(
LocalSearchWithTabuList
&&
from
) :
50
ApproximationScheme
(
std
::
move
(
from
)),
_MaxNbDecreasing_
(
std
::
move
(
from
.
_MaxNbDecreasing_
)) {
51
GUM_CONS_MOV
(
LocalSearchWithTabuList
);
52
}
53
54
/// destructor
55
INLINE
LocalSearchWithTabuList
::~
LocalSearchWithTabuList
() {
56
GUM_DESTRUCTOR
(
LocalSearchWithTabuList
);
57
}
58
59
/// copy operator
60
INLINE LocalSearchWithTabuList&
61
LocalSearchWithTabuList
::
operator
=(
const
LocalSearchWithTabuList
&
from
) {
62
ApproximationScheme
::
operator
=(
from
);
63
_MaxNbDecreasing_
=
from
.
_MaxNbDecreasing_
;
64
return
*
this
;
65
}
66
67
/// move operator
68
INLINE
LocalSearchWithTabuList
&
69
LocalSearchWithTabuList
::
operator
=(
LocalSearchWithTabuList
&&
from
) {
70
ApproximationScheme
::
operator
=(
std
::
move
(
from
));
71
_MaxNbDecreasing_
=
std
::
move
(
from
.
_MaxNbDecreasing_
);
72
return
*
this
;
73
}
74
75
/// set the max number of changes decreasing the score that we allow to
76
/// apply
77
INLINE
void
LocalSearchWithTabuList
::
setMaxNbDecreasingChanges
(
Size
nb
) {
78
_MaxNbDecreasing_
=
nb
;
79
}
80
81
/// returns the approximation policy of the learning algorithm
82
INLINE
ApproximationScheme
&
LocalSearchWithTabuList
::
approximationScheme
() {
return
*
this
; }
83
84
}
/* namespace learning */
85
86
}
/* namespace gum */
87
88
#
endif
/* DOXYGEN_SHOULD_SKIP_THIS */
gum::Set::emplace
INLINE void emplace(Args &&... args)
Definition:
set_tpl.h:643
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