SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PyramidChi2.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) 2008-2009 Alexander Binder
8  * Copyright (C) 2008-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9  */
10 
11 #ifndef PYRAMIDCHI2_H_
12 #define PYRAMIDCHI2_H_
13 
14 #include <shogun/lib/config.h>
15 
16 #include <shogun/lib/common.h>
20 
21 namespace shogun
22 {
23  template <class T> class CDenseFeatures;
24 
30 class CPyramidChi2 : public CDotKernel
31 {
32 public:
34  CPyramidChi2();
35 
50  CPyramidChi2(int32_t size, int32_t num_cells2,
51  float64_t* weights_foreach_cell2,
52  int32_t width_computation_type2,
53  float64_t width2);
54 
75  int32_t size, int32_t num_cells2,
76  float64_t* weights_foreach_cell2,
77  int32_t width_computation_type2,
78  float64_t width2 );
79 
85  virtual bool init(CFeatures* l, CFeatures* r);
86 
87 
88  virtual ~CPyramidChi2();
89 
91  virtual void cleanup();
92 
95  {
96  return K_PYRAMIDCHI2;
97  }
98 
100  virtual const char* get_name() const { return "PyramidChi2"; }
101 
102 
116  virtual void setparams_pychi2(int32_t num_cells2,
117  float64_t* weights_foreach_cell2,
118  int32_t width_computation_type2,
119  float64_t width2);
120 
121 protected:
128  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
129 
130 protected:
131 
133  int32_t num_cells;
134 
137 
144 
145 
146 
147 
148 };
149 }
150 #endif /*PYRAMIDCHI2_H_*/

SHOGUN Machine Learning Toolbox - Documentation