LDA++
ProgressEvents.hpp
1 #ifndef _LDAPLUSPLUS_EVENTS_PROGRESS_EVENTS_HPP_
2 #define _LDAPLUSPLUS_EVENTS_PROGRESS_EVENTS_HPP_
3 
4 
5 #include "ldaplusplus/events/Events.hpp"
6 #include "ldaplusplus/Parameters.hpp"
7 
8 namespace ldaplusplus {
9 
10 template <typename Scalar>
11 class LDA;
12 
13 namespace events {
14 
15 
16 template <typename Scalar>
18 {
19  public:
20  ExpectationProgressEvent(Scalar likelihood) :
21  Event("ExpectationProgressEvent"),
22  likelihood_(likelihood)
23  {}
24 
25  Scalar likelihood() const { return likelihood_; }
26 
27  private:
28  Scalar likelihood_;
29 };
30 
31 
32 template <typename Scalar>
34 {
35  public:
36  MaximizationProgressEvent(Scalar likelihood) :
37  Event("MaximizationProgressEvent"),
38  likelihood_(likelihood)
39  {}
40 
41  Scalar likelihood() const { return likelihood_; }
42 
43  private:
44  Scalar likelihood_;
45 };
46 
47 
48 template <typename Scalar>
49 class EpochProgressEvent : public Event
50 {
51  public:
52  EpochProgressEvent(const std::shared_ptr<parameters::Parameters> parameters) :
53  Event("EpochProgressEvent"),
54  model_parameters_(parameters)
55  {}
56 
57  const std::shared_ptr<parameters::Parameters> model_parameters() const {
58  return model_parameters_;
59  }
60 
61  private:
62  std::shared_ptr<parameters::Parameters> model_parameters_;
63 };
64 
65 } // namespace events
66 } // namespace ldaplusplus
67 
68 #endif // _LDAPLUSPLUS_EVENTS_PROGRESS_EVENTS_HPP_
Event(std::string id)
Definition: Events.cpp:8
Definition: Events.hpp:18
Definition: ProgressEvents.hpp:11
Definition: ProgressEvents.hpp:49
Definition: ProgressEvents.hpp:17
Definition: ProgressEvents.hpp:33
Definition: Document.hpp:11