SHOGUN
v3.0.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
shogun
lib
computation
job
IndependentJob.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 INDEPENDENT_JOB_H_
11
#define INDEPENDENT_JOB_H_
12
13
#include <
shogun/lib/config.h
>
14
#include <
shogun/base/SGObject.h
>
15
#include <
shogun/base/Parameter.h
>
16
#include <
shogun/lib/computation/aggregator/JobResultAggregator.h
>
17
18
namespace
shogun
19
{
20
26
class
CIndependentJob
:
public
CSGObject
27
{
28
public
:
30
CIndependentJob
()
31
:
CSGObject
()
32
{
33
init();
34
}
35
41
CIndependentJob
(
CJobResultAggregator
* aggregator)
42
:
CSGObject
(),
m_aggregator
(aggregator)
43
{
44
init();
45
46
m_aggregator
=aggregator;
47
SG_REF
(
m_aggregator
);
48
}
49
51
virtual
~CIndependentJob
()
52
{
53
SG_UNREF
(
m_aggregator
);
54
}
55
60
virtual
void
compute
() = 0;
61
63
virtual
const
char
*
get_name
()
const
64
{
65
return
"IndependentJob"
;
66
}
67
protected
:
69
CJobResultAggregator
*
m_aggregator
;
70
71
private
:
73
void
init()
74
{
75
m_aggregator
=NULL;
76
77
SG_ADD
((
CSGObject
**)&
m_aggregator
,
"job_result_aggregator"
,
78
"Job result aggregator for current job"
,
MS_NOT_AVAILABLE
);
79
}
80
};
81
82
}
83
84
#endif // INDEPENDENT_JOB_H_
SHOGUN
Machine Learning Toolbox - Documentation