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
machine
KernelStructuredOutputMachine.cpp
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) 2012 Fernando José Iglesias García
8
* Copyright (C) 2012 Fernando José Iglesias García
9
*/
10
11
#include <
shogun/machine/KernelStructuredOutputMachine.h
>
12
13
using namespace
shogun;
14
15
CKernelStructuredOutputMachine::CKernelStructuredOutputMachine
()
16
:
CStructuredOutputMachine
(), m_kernel(NULL)
17
{
18
register_parameters();
19
}
20
21
CKernelStructuredOutputMachine::CKernelStructuredOutputMachine
(
22
CStructuredModel
* model,
23
CStructuredLabels
* labs,
24
CKernel
* kernel)
25
:
CStructuredOutputMachine
(model, labs), m_kernel(NULL)
26
{
27
set_kernel
(kernel);
28
register_parameters();
29
}
30
31
CKernelStructuredOutputMachine::~CKernelStructuredOutputMachine
()
32
{
33
SG_UNREF
(
m_kernel
)
34
}
35
36
void
CKernelStructuredOutputMachine::set_kernel
(
CKernel
* k)
37
{
38
SG_REF
(k);
39
SG_UNREF
(
m_kernel
);
40
m_kernel
= k;
41
}
42
43
CKernel
*
CKernelStructuredOutputMachine::get_kernel
()
const
44
{
45
SG_REF
(
m_kernel
);
46
return
m_kernel
;
47
}
48
49
void
CKernelStructuredOutputMachine::register_parameters()
50
{
51
SG_ADD
((
CSGObject
**)&
m_kernel
,
"m_kernel"
,
"The kernel"
,
MS_AVAILABLE
);
52
}
SHOGUN
Machine Learning Toolbox - Documentation