ShortRealFeatures.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _SHORTREALFEATURES__H__
00012 #define _SHORTREALFEATURES__H__
00013
00014 #include "features/SimpleFeatures.h"
00015 #include "lib/common.h"
00016
00021 class CShortRealFeatures: public CSimpleFeatures<float32_t>
00022 {
00023 public:
00028 CShortRealFeatures(int32_t size=0) : CSimpleFeatures<float32_t>(size) {}
00029
00031 CShortRealFeatures(const CShortRealFeatures & orig) :
00032 CSimpleFeatures<float32_t>(orig) {}
00033
00041 inline CShortRealFeatures(float32_t* src, int32_t num_feat, int32_t num_vec) :
00042 CSimpleFeatures<float32_t>(0)
00043 {
00044 CSimpleFeatures<float32_t>::copy_feature_matrix(src, num_feat, num_vec);
00045 }
00046
00051 CShortRealFeatures(char* fname) : CSimpleFeatures<float32_t>(fname)
00052 {
00053 load(fname);
00054 }
00055
00062 inline virtual void get_fm(float32_t** dst, int32_t* d1, int32_t* d2)
00063 {
00064 CSimpleFeatures<float32_t>::get_fm(dst, d1, d2);
00065 }
00066
00075 inline virtual void copy_feature_matrix(float32_t* src, int32_t num_feat, int32_t num_vec)
00076 {
00077 CSimpleFeatures<float32_t>::copy_feature_matrix(src, num_feat, num_vec);
00078 }
00079
00085 virtual bool load(char* fname);
00086
00092 virtual bool save(char* fname);
00093 };
00094 #endif