SHOGUN  v3.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LogKernel.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) 2011 Jakub Jirku
8  * Copyright (C) 2007-2011 Fraunhofer Institute FIRST and Max-Planck-Society
9  */
10 
11 #include <shogun/lib/config.h>
12 
13 #ifndef LOGKERNEL_H_
14 #define LOGKERNEL_H_
15 
16 #include <shogun/lib/common.h>
17 #include <shogun/kernel/Kernel.h>
19 
20 namespace shogun
21 {
22 
23 class CDistance;
24 
35 class CLogKernel: public CKernel
36 {
37 public:
39  CLogKernel();
40 
46  CLogKernel(int32_t cache, float64_t degree, CDistance* dist);
47 
54  CLogKernel(CFeatures *l, CFeatures *r, float64_t degree, CDistance* dist);
55 
61  virtual bool init(CFeatures* l, CFeatures* r);
62 
66  virtual EKernelType get_kernel_type() { return K_POWER; }
67 
72 
77 
81  virtual const char* get_name() const { return "LogKernel"; }
82 
83  virtual ~CLogKernel();
84 
85 protected:
93  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
94 
95 private:
96  void init();
97 
98 protected:
101 
104 };
105 }
106 
107 #endif /* LOGKERNEL_H_ */

SHOGUN Machine Learning Toolbox - Documentation