SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PolyMatchWordStringKernel.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 _POLYMATCHWORDSTRINGKERNEL_H___
12 #define _POLYMATCHWORDSTRINGKERNEL_H___
13 
14 #include <shogun/lib/config.h>
15 
16 #include <shogun/lib/common.h>
19 
20 namespace shogun
21 {
41 {
42  public:
45 
52  CPolyMatchWordStringKernel(int32_t size, int32_t degree, bool inhomogene);
53 
62 
64 
71  virtual bool init(CFeatures* l, CFeatures* r);
72 
74  virtual void cleanup();
75 
80  virtual EKernelType get_kernel_type() { return K_POLYMATCH; }
81 
86  virtual const char* get_name() const { return "PolyMatchWordStringKernel"; }
87 
88  protected:
97  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
98 
99  private:
100  void init();
101 
102  protected:
104  int32_t degree;
107 };
108 }
109 #endif /* _POLYMATCHWORDSTRINGKERNEL_H__ */
EKernelType
Definition: Kernel.h:57
virtual const char * get_name() const
The class PolyMatchWordStringKernel computes a variant of the polynomial kernel on word-features...
double float64_t
Definition: common.h:50
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
The class Features is the base class of all feature objects.
Definition: Features.h:68
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
Template class StringKernel, is the base class of all String Kernels.
Definition: StringKernel.h:26
virtual bool init(CFeatures *l, CFeatures *r)

SHOGUN Machine Learning Toolbox - Documentation