SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
kernel
CircularKernel.h
浏览该文件的文档.
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 Abhinav Maurya
8
* Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society
9
* Copyright (C) 2011 Indian Institute of Technology Bombay
10
*/
11
12
#include <
shogun/lib/config.h
>
13
14
#ifndef _CIRCULARKERNEL_H__
15
#define _CIRCULARKERNEL_H__
16
17
#include <
shogun/lib/common.h
>
18
#include <
shogun/kernel/Kernel.h
>
19
#include <
shogun/distance/Distance.h
>
20
21
namespace
shogun
22
{
23
24
class
CDistance;
25
38
class
CCircularKernel
:
public
CKernel
39
{
40
public
:
42
CCircularKernel
();
43
50
CCircularKernel
(int32_t size,
float64_t
sigma
,
CDistance
* dist);
51
59
CCircularKernel
(
CFeatures
*l,
CFeatures
*r,
float64_t
sigma,
CDistance
* dist);
60
67
virtual
bool
init
(
CFeatures
* l,
CFeatures
* r);
68
72
virtual
EKernelType
get_kernel_type
() {
return
K_CIRCULAR
; }
73
77
virtual
EFeatureType
get_feature_type
() {
return
distance
->
get_feature_type
(); }
78
82
virtual
EFeatureClass
get_feature_class
() {
return
distance
->
get_feature_class
(); }
83
87
virtual
const
char
*
get_name
()
const
{
return
"CircularKernel"
; }
88
93
virtual
void
set_sigma
(
float64_t
s)
94
{
95
sigma=s;
96
}
97
102
virtual
float64_t
get_sigma
()
const
103
{
104
return
sigma
;
105
}
106
107
virtual
~CCircularKernel
();
108
117
virtual
void
load_serializable_post
() throw (
ShogunException
);
118
128
virtual
float64_t
compute
(int32_t idx_a, int32_t idx_b);
129
130
private:
131
void
init();
132
133
protected:
134
136
CDistance
*
distance
;
137
139
float64_t
sigma;
140
141
};
142
}
143
144
#endif
/* _CIRCULARKERNEL_H__ */
SHOGUN
机器学习工具包 - 项目文档