aGrUM  0.20.2
a C++ library for (probabilistic) graphical models
approximationSchemeListener.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 /**
23  * @file
24  * @brief gum::ApproximationSchemeListener header file.
25  *
26  * @author Christophe GONZALES(@AMU) and Pierre-Henri WUILLEMIN(@LIP6)
27  */
28 
29 #ifndef APPROXIMATIONSCHEMELISTENER_H
30 #define APPROXIMATIONSCHEMELISTENER_H
31 
32 #include <agrum/agrum.h>
33 #include <agrum/tools/core/signal/listener.h>
34 
35 #include <agrum/tools/core/approximations/IApproximationSchemeConfiguration.h>
36 
37 namespace gum {
38 
39  /**
40  * @class ApproximationSchemeListener
41  * @brief The ApproximationSchemeListener class.
42  *
43  * @warning Doxygen does not like spanning command on multiple line, so we
44  * could not configure it with the correct include directive. Use the
45  * following code snippet to include this file.
46  * @code
47  * #include <agrum/tools/core/approximations/approximationSchemeListener.h>
48  * @endcode
49  */
51  public:
52  /**
53  * @brief Class constructor.
54  * @param sch The scheme configuration.
55  */
56  ApproximationSchemeListener(IApproximationSchemeConfiguration& sch);
57 
58  /**
59  * @brief Class destructor.
60  */
61  virtual ~ApproximationSchemeListener();
62 
63  /**
64  * @brief When progress was made.
65  * @param src The signal source.
66  * @param pourcent The advancement in percent.
67  * @param error The number of errors.
68  * @param time The time.
69  */
70  virtual void whenProgress(const void* src,
71  const Size step,
72  const double error,
73  const double time)
74  = 0;
75 
76  /**
77  * @brief When it stops.
78  * @param src The signal source.
79  * @param message A message.
80  */
81  virtual void whenStop(const void* src, const std::string message) = 0;
82 
83  protected:
84  /**
85  * Copy constructor.
86  */
88 
89  /**
90  * Copy operator.
91  */
94 
95  private:
96  /// The scheme configuration.
98  };
99 } // namespace gum
100 
101 #endif // APPROXIMATIONSCHEMELISTENER_H
ApproximationSchemeListener(const ApproximationSchemeListener &other)
Copy constructor.
INLINE void emplace(Args &&... args)
Definition: set_tpl.h:669
virtual void whenStop(const void *src, const std::string message)=0
When it stops.
virtual ~ApproximationSchemeListener()
Class destructor.
ApproximationSchemeListener(IApproximationSchemeConfiguration &sch)
Class constructor.
IApproximationSchemeConfiguration & sch__
The scheme configuration.
virtual void whenProgress(const void *src, const Size step, const double error, const double time)=0
When progress was made.
ApproximationSchemeListener & operator=(const ApproximationSchemeListener &other)
Copy operator.
The ApproximationSchemeListener class.