SHOGUN
v2.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
MultiquadricKernel.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 Joanna Stocka
8
* Copyright (C) 2007-2011 Fraunhofer Institute FIRST and Max-Planck-Society
9
*/
10
11
#include <
shogun/lib/config.h
>
12
13
#ifndef MULTIQUADRIC_H_
14
#define MULTIQUADRIC_H_
15
16
#include <
shogun/lib/common.h
>
17
#include <
shogun/kernel/Kernel.h
>
18
#include <
shogun/distance/Distance.h
>
19
20
namespace
shogun
21
{
22
23
class
CDistance;
30
class
CMultiquadricKernel
:
public
CKernel
31
{
32
public
:
34
CMultiquadricKernel
();
35
41
CMultiquadricKernel
(int32_t cache,
float64_t
coef,
CDistance
* dist);
42
49
CMultiquadricKernel
(
CFeatures
*l,
CFeatures
*r,
float64_t
coef,
CDistance
* dist);
50
56
virtual
bool
init
(
CFeatures
* l,
CFeatures
* r);
57
61
inline
virtual
EKernelType
get_kernel_type
() {
return
K_MULTIQUADRIC
; }
62
66
inline
virtual
EFeatureType
get_feature_type
() {
return
m_distance
->
get_feature_type
(); }
67
71
inline
virtual
EFeatureClass
get_feature_class
() {
return
m_distance
->
get_feature_class
(); }
72
76
inline
virtual
const
char
*
get_name
()
const
{
return
"Multiquadric"
; }
77
81
inline
float64_t
get_coef
() {
return
m_coef
; }
82
86
inline
void
set_coef
(
float64_t
value) {
m_coef
= value; }
87
88
virtual
~CMultiquadricKernel
();
89
90
protected
:
98
virtual
float64_t
compute
(int32_t idx_a, int32_t idx_b);
99
100
private
:
101
void
init();
102
103
protected
:
104
106
CDistance
*
m_distance
;
107
109
float64_t
m_coef
;
110
111
};
112
}
113
114
#endif
/* MULTIQUADRIC_H_ */
SHOGUN
Machine Learning Toolbox - Documentation