SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExponentialKernel.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  * Gaussian Kernel used as template, attribution:
8  * Written (W) 1999-2010 Soeren Sonnenburg
9  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
10  * Copyright (C) 2010 Berlin Institute of Technology
11  *
12  * Slightly edited by Justin Patera 2011
13  */
14 
15 #ifndef _EXPONENTIALKERNEL_H___
16 #define _EXPONENTIALKERNEL_H___
17 
18 #include <shogun/lib/config.h>
19 
20 #include <shogun/lib/common.h>
24 
25 namespace shogun
26 {
27  class CDotFeatures;
40 {
41  public:
46 
56  float64_t width, CDistance* distance, int32_t size);
57 
59  virtual ~CExponentialKernel();
60 
67  virtual bool init(CFeatures* l, CFeatures* r);
68 
70  virtual void cleanup();
71 
77 
82  virtual const char* get_name() const { return "ExponentialKernel"; }
83 
88  virtual float64_t get_width() const
89  {
90  return m_width;
91  }
92 
93  protected:
102  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
103 
112  virtual void load_serializable_post() throw (ShogunException);
113 
114  private:
115  void init();
116 
117  protected:
122 };
123 }
124 #endif /* _EXPONENTIALKERNEL_H__ */

SHOGUN Machine Learning Toolbox - Documentation