PyramidChi2.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef PYRAMIDCHI2_H_
00012 #define PYRAMIDCHI2_H_
00013
00014 #include "lib/common.h"
00015 #include "kernel/SimpleKernel.h"
00016 #include "features/Features.h"
00017 #include "features/SimpleFeatures.h"
00018
00019 namespace shogun
00020 {
00021 template <class T> class CSimpleFeatures;
00022
00030 class CPyramidChi2 : public CSimpleKernel<float64_t>
00031 {
00032 public:
00033
00048 CPyramidChi2(int32_t size, int32_t num_cells2,
00049 float64_t* weights_foreach_cell2,
00050 int32_t width_computation_type2,
00051 float64_t width2);
00052
00071 CPyramidChi2(
00072 CSimpleFeatures<float64_t>* l, CSimpleFeatures<float64_t>* r,
00073 int32_t size, int32_t num_cells2,
00074 float64_t* weights_foreach_cell2,
00075 int32_t width_computation_type2,
00076 float64_t width2 );
00077
00083 virtual bool init(CFeatures* l, CFeatures* r);
00084
00085
00086 virtual ~CPyramidChi2();
00087
00089 virtual void cleanup();
00090
00092 virtual EKernelType get_kernel_type()
00093 {
00094
00095 return K_PYRAMIDCHI2;
00096 }
00097
00099 virtual const char* get_name() const { return "PyramidoverChi2"; }
00100
00101
00102
00103
00104
00105
00106
00107 protected:
00109 CPyramidChi2();
00116 virtual float64_t compute(int32_t idx_a, int32_t idx_b);
00117
00118 protected:
00119
00121 int32_t num_cells;
00122
00124 float64_t* weights;
00125
00127 int32_t width_computation_type;
00129 float64_t width;
00131 int32_t num_randfeats_forwidthcomputation;
00132
00133
00134
00135
00136 };
00137 }
00138 #endif