SHOGUN  v2.0.0
 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/common.h>
18 
19 namespace shogun
20 {
21  template <class T> class CDenseFeatures;
22 
28 class CPyramidChi2 : public CDotKernel
29 {
30 public:
32  CPyramidChi2();
33 
48  CPyramidChi2(int32_t size, int32_t num_cells2,
49  float64_t* weights_foreach_cell2,
50  int32_t width_computation_type2,
51  float64_t width2);
52 
73  int32_t size, int32_t num_cells2,
74  float64_t* weights_foreach_cell2,
75  int32_t width_computation_type2,
76  float64_t width2 );
77 
83  virtual bool init(CFeatures* l, CFeatures* r);
84 
85 
86  virtual ~CPyramidChi2();
87 
89  virtual void cleanup();
90 
93  {
94  return K_PYRAMIDCHI2;
95  }
96 
98  virtual const char* get_name() const { return "PyramidoverChi2"; }
99 
100 
114  virtual void setparams_pychi2(int32_t num_cells2,
115  float64_t* weights_foreach_cell2,
116  int32_t width_computation_type2,
117  float64_t width2);
118 
119 protected:
126  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
127 
128 protected:
129 
131  int32_t num_cells;
132 
135 
142 
143 
144 
145 
146 };
147 }
148 #endif /*PYRAMIDCHI2_H_*/

SHOGUN Machine Learning Toolbox - Documentation