SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JobResultAggregator.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2013 Soumyajit De
8  */
9 
10 #ifndef JOB_RESULT_AGGREGATOR_H_
11 #define JOB_RESULT_AGGREGATOR_H_
12 
13 #include <shogun/lib/config.h>
14 #include <shogun/base/SGObject.h>
16 #include <shogun/base/Parameter.h>
17 
18 namespace shogun
19 {
20 
26 {
27 public:
30  : CSGObject()
31  {
32  init();
33 
34  SG_GCDEBUG("%s created (%p)\n", this->get_name(), this)
35  }
36 
39  {
41 
42  SG_GCDEBUG("%s destroyed (%p)\n", this->get_name(), this)
43  }
44 
51  virtual void submit_result(CJobResult* result) = 0;
52 
57  virtual void finalize() = 0;
58 
61  {
62  return m_result;
63  }
64 
66  virtual const char* get_name() const
67  {
68  return "JobResultAggregator";
69  }
70 protected:
73 
74 private:
76  void init()
77  {
78  m_result=NULL;
79 
80  SG_ADD((CSGObject**)&m_result, "final_result",
81  "Aggregation of computation job results", MS_NOT_AVAILABLE);
82  }
83 };
84 
85 }
86 
87 #endif // JOB_RESULT_AGGREGATOR_H_

SHOGUN Machine Learning Toolbox - Documentation