aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
BNLearnerListener.cpp
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  <one line to give the program's name and a brief idea of what it does.>
23  Copyright (c) 2012 Pierre-Henri WUILLEMIN(@LIP6)
24 <pierre-henri.wuillemin@lip6.fr>
25 
26  This program is free software: you can redistribute it and/or modify
27  it under the terms of the GNU General Public License as published by
28  the Free Software Foundation, either version 3 of the License, or
29  (at your option) any later version.
30 s
31  This program is distributed in the hope that it will be useful,
32  but WITHOUT ANY WARRANTY; without even the implied warranty of
33  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34  GNU General Public License for more details.
35 
36  You should have received a copy of the GNU General Public License
37  along with this program. If not, see <http://www.gnu.org/licenses/>.
38 */
39 
40 #include <agrum/BN/learning/BNLearnUtils/BNLearnerListener.h>
41 #include <agrum/BN/learning/BNLearnUtils/genericBNLearner.h>
42 
43 namespace gum {
44  namespace learning {
49  }
50 
54  GUM_ERROR(OperationNotAllowed, "No copy constructor for BNLearnerListener")
55  }
56 
59  ;
60  }
61 
64  GUM_ERROR(OperationNotAllowed, "No copy constructor for BNLearnerListener")
65  }
66 
67  void
68  BNLearnerListener::whenProgress(const void* src, Size pourcent, double error, double time) {
69  _bnlearner_->distributeProgress(static_cast< const ApproximationScheme* >(src),
70  pourcent,
71  error,
72  time);
73  }
75  _bnlearner_->distributeStop(static_cast< const ApproximationScheme* >(src), message);
76  }
77  } // namespace learning
78 } // namespace gum
INLINE void emplace(Args &&... args)
Definition: set_tpl.h:643
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)