SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
StringKernel.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) 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/lib/config.h>
15 
16 #include <shogun/kernel/Kernel.h>
18 
19 namespace shogun
20 {
26 template <class ST> class CStringKernel : public CKernel
27 {
28  public:
33  CStringKernel(int32_t cachesize=0) : CKernel(cachesize) {}
34 
41  {
42  init(l, r);
43  }
44 
55  virtual bool init(CFeatures* l, CFeatures* r)
56  {
57  CKernel::init(l,r);
58 
63 
64  return true;
65  }
66 
72 
78 
84  virtual const char* get_name() const {
85  return "StringKernel"; }
86 
94  virtual EKernelType get_kernel_type()=0;
95 };
96 
98 
100 
102 
104 
106 
108 
110 }
111 #endif /* _STRINGKERNEL_H__ */
112 
EKernelType
Definition: Kernel.h:57
EFeatureClass
shogun feature class
Definition: FeatureTypes.h:38
virtual EFeatureType get_feature_type()
#define ASSERT(x)
Definition: SGIO.h:201
virtual EFeatureClass get_feature_class() const =0
virtual EKernelType get_kernel_type()=0
EFeatureType
shogun feature type
Definition: FeatureTypes.h:19
virtual bool init(CFeatures *l, CFeatures *r)
Definition: StringKernel.h:55
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
CStringKernel(CFeatures *l, CFeatures *r)
Definition: StringKernel.h:40
The class Features is the base class of all feature objects.
Definition: Features.h:68
virtual EFeatureClass get_feature_class()
Definition: StringKernel.h:71
The Kernel base class.
Definition: Kernel.h:159
virtual const char * get_name() const
Definition: StringKernel.h:84
CStringKernel(int32_t cachesize=0)
Definition: StringKernel.h:33
Template class StringKernel, is the base class of all String Kernels.
Definition: StringKernel.h:26
virtual EFeatureType get_feature_type() const =0

SHOGUN Machine Learning Toolbox - Documentation