SHOGUN  v3.0.1
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
StringKernel.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) 1999-2009 Soeren Sonnenburg
8  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9  */
10 
11 #ifndef _STRINGKERNEL_H___
12 #define _STRINGKERNEL_H___
13 
14 #include <shogun/kernel/Kernel.h>
16 
17 namespace shogun
18 {
24 template <class ST> class CStringKernel : public CKernel
25 {
26  public:
31  CStringKernel(int32_t cachesize=0) : CKernel(cachesize) {}
32 
39  {
40  init(l, r);
41  }
42 
53  virtual bool init(CFeatures* l, CFeatures* r)
54  {
55  CKernel::init(l,r);
56 
61 
62  return true;
63  }
64 
70 
76 
82  virtual const char* get_name() const {
83  return "StringKernel"; }
84 
92  virtual EKernelType get_kernel_type()=0;
93 };
94 
96 
98 
100 
102 
104 
106 
108 }
109 #endif /* _STRINGKERNEL_H__ */
110 
EKernelType
Definition: Kernel.h:51
EFeatureClass
shogun feature class
Definition: FeatureTypes.h:35
virtual EFeatureType get_feature_type()
#define ASSERT(x)
Definition: SGIO.h:203
virtual EFeatureClass get_feature_class() const =0
virtual EKernelType get_kernel_type()=0
EFeatureType
shogun feature type
Definition: FeatureTypes.h:16
virtual bool init(CFeatures *l, CFeatures *r)
Definition: StringKernel.h:53
CStringKernel(CFeatures *l, CFeatures *r)
Definition: StringKernel.h:38
The class Features is the base class of all feature objects.
Definition: Features.h:62
virtual EFeatureClass get_feature_class()
Definition: StringKernel.h:69
The Kernel base class.
Definition: Kernel.h:150
virtual const char * get_name() const
Definition: StringKernel.h:82
CStringKernel(int32_t cachesize=0)
Definition: StringKernel.h:31
Template class StringKernel, is the base class of all String Kernels.
Definition: StringKernel.h:24
virtual EFeatureType get_feature_type() const =0

SHOGUN Machine Learning Toolbox - Documentation