SHOGUN  3.2.1
 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/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 

SHOGUN Machine Learning Toolbox - Documentation