SHOGUN  v2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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/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 
69  inline virtual EFeatureClass get_feature_class() { return C_STRING; }
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 

SHOGUN Machine Learning Toolbox - Documentation