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/RealFeatures.h"
00018
00019
00020
00022 class CPyramidChi2 : public CSimpleKernel<DREAL>
00023 {
00024 public:
00025
00036 CPyramidChi2(INT size, DREAL width2,
00037 INT* pyramidlevels2, INT numlevels2,
00038 INT numbinsinhistogram2, DREAL* weights2, INT numweights2);
00039
00052 CPyramidChi2(CRealFeatures* l, CRealFeatures* r, INT size, DREAL width2,
00053 INT* pyramidlevels2, INT numlevels2,
00054 INT numbinsinhistogram2, DREAL* weights2, INT numweights2);
00055
00061 virtual bool init(CFeatures* l, CFeatures* r);
00062
00063
00064 virtual ~CPyramidChi2();
00065
00067 virtual void cleanup();
00068
00069
00070
00071
00072
00073
00074 virtual bool load_init(FILE* src);
00075
00081 virtual bool save_init(FILE* dest);
00082
00084 virtual EKernelType get_kernel_type()
00085 {
00086
00087 return K_PYRAMIDCHI2;
00088 }
00089
00091 virtual const CHAR* get_name()
00092 {
00093 return("PyramidoverChi2\0");
00094 }
00095
00097 void setstandardweights();
00098
00100 bool sanitycheck_weak();
00101
00102 protected:
00109 virtual DREAL compute(INT idx_a, INT idx_b);
00110
00111 protected:
00113 DREAL width;
00115 INT* pyramidlevels;
00116
00118 INT numlevels;
00120 INT numbinsinhistogram;
00122 DREAL* weights;
00123
00125 INT numweights;
00126
00127 };
00128
00129 #endif