SHOGUN  v2.0.0
 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/common.h>
22 
23 namespace shogun
24 {
25  class CDotFeatures;
38 {
39  public:
44 
54  float64_t width, CDistance* distance, int32_t size);
55 
57  virtual ~CExponentialKernel();
58 
65  virtual bool init(CFeatures* l, CFeatures* r);
66 
68  virtual void cleanup();
69 
75 
80  inline virtual const char* get_name() const { return "ExponentialKernel"; }
81 
86  inline virtual float64_t get_width() const
87  {
88  return m_width;
89  }
90 
91  protected:
100  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
101 
110  virtual void load_serializable_post() throw (ShogunException);
111 
112  private:
113  void init();
114 
115  protected:
120 };
121 }
122 #endif /* _EXPONENTIALKERNEL_H__ */

SHOGUN Machine Learning Toolbox - Documentation