SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 
12 #include <shogun/kernel/Kernel.h>
13 
14 using namespace shogun;
15 
17 : CStructuredOutputMachine(), m_kernel(NULL)
18 {
19  register_parameters();
20 }
21 
23  CStructuredModel* model,
24  CStructuredLabels* labs,
25  CKernel* kernel)
26 : CStructuredOutputMachine(model, labs), m_kernel(NULL)
27 {
28  set_kernel(kernel);
29  register_parameters();
30 }
31 
33 {
35 }
36 
38 {
39  SG_REF(k);
41  m_kernel = k;
42 }
43 
45 {
47  return m_kernel;
48 }
49 
50 void CKernelStructuredOutputMachine::register_parameters()
51 {
52  SG_ADD((CSGObject**)&m_kernel, "m_kernel", "The kernel", MS_AVAILABLE);
53 }
Base class of the labels used in Structured Output (SO) problems.
#define SG_REF(x)
Definition: SGObject.h:51
Class SGObject is the base class of all shogun objects.
Definition: SGObject.h:112
Class CStructuredModel that represents the application specific model and contains most of the applic...
#define SG_UNREF(x)
Definition: SGObject.h:52
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
The Kernel base class.
Definition: Kernel.h:159
#define SG_ADD(...)
Definition: SGObject.h:81

SHOGUN Machine Learning Toolbox - Documentation