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
kernel
BesselKernel.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) 2011 Ziyuan Lin
8
* Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society
9
*/
10
11
#ifndef BESSELKERNEL_H_
12
#define BESSELKERNEL_H_
13
14
#include <
shogun/lib/common.h
>
15
#include <
shogun/kernel/Kernel.h
>
16
#include <
shogun/kernel/DistanceKernel.h
>
17
18
namespace
shogun
19
{
20
class
CDistance;
32
class
CBesselKernel
:
public
CDistanceKernel
33
{
34
public
:
36
CBesselKernel
();
37
46
CBesselKernel
(int32_t size,
float64_t
order
,
47
float64_t
width
, int32_t
degree
,
48
CDistance
* dist);
49
60
CBesselKernel
(
CFeatures
* l,
CFeatures
* r,
61
float64_t
order,
float64_t
width, int32_t degree,
62
CDistance
* dist, int32_t size=10);
63
67
virtual
~CBesselKernel
();
68
75
virtual
bool
init
(
CFeatures
* l,
CFeatures
* r);
76
78
virtual
void
cleanup
();
79
84
virtual
EKernelType
get_kernel_type
()
85
{
86
return
K_BESSEL
;
87
}
88
92
virtual
EFeatureType
get_feature_type
()
93
{
94
return
distance
->
get_feature_type
();
95
}
96
100
virtual
EFeatureClass
get_feature_class
()
101
{
102
return
distance
->
get_feature_class
();
103
}
104
109
virtual
const
char
*
get_name
()
const
110
{
111
return
"BesselKernel"
;
112
}
113
118
virtual
void
set_order
(
float64_t
v)
119
{
120
order = v;
121
}
122
127
virtual
float64_t
get_order
()
const
128
{
129
return
order
;
130
}
131
136
virtual
void
set_width
(
float64_t
tau)
137
{
138
width = tau;
139
}
140
145
virtual
float64_t
get_width
()
const
146
{
147
return
width
;
148
}
149
154
virtual
void
set_degree
(int32_t n)
155
{
156
degree = n;
157
}
158
163
virtual
int32_t
get_degree
()
const
164
{
165
return
degree
;
166
}
167
168
protected
:
169
float64_t
compute
(int32_t idx_a, int32_t idx_b);
170
171
private
:
172
void
init();
173
174
protected
:
176
float64_t
order
;
178
int32_t
degree
;
179
};
180
181
}
182
183
#endif
/* BESSELKERNEL_H_ */
SHOGUN
Machine Learning Toolbox - Documentation