RealFeatures.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _DREALFEATURES__H__
00014 #define _DREALFEATURES__H__
00015
00016 #include "features/SimpleFeatures.h"
00017 #include "features/CharFeatures.h"
00018 #include "lib/common.h"
00019
00021 class CRealFeatures : public CSimpleFeatures<DREAL>
00022 {
00023 public:
00028 CRealFeatures(INT size=0) : CSimpleFeatures<DREAL>(size) {}
00029
00031 CRealFeatures(const CRealFeatures & orig) :
00032 CSimpleFeatures<DREAL>(orig) {}
00033
00041 inline CRealFeatures(DREAL* src, INT num_feat, INT num_vec): CSimpleFeatures<DREAL>(0)
00042 {
00043 CSimpleFeatures<DREAL>::copy_feature_matrix(src, num_feat, num_vec);
00044 }
00045
00050 CRealFeatures(CHAR* fname) : CSimpleFeatures<DREAL>(fname)
00051 {
00052 load(fname);
00053 }
00054
00062 bool Align_char_features(CCharFeatures* cf, CCharFeatures* Ref, DREAL gapCost) ;
00063
00070 inline virtual void get_fm(DREAL** dst, INT* d1, INT* d2)
00071 {
00072 CSimpleFeatures<DREAL>::get_fm(dst, d1, d2);
00073 }
00074
00083 inline virtual void copy_feature_matrix(DREAL* src, INT num_feat, INT num_vec)
00084 {
00085 CSimpleFeatures<DREAL>::copy_feature_matrix(src, num_feat, num_vec);
00086 }
00087
00093 virtual bool load(CHAR* fname);
00094
00100 virtual bool save(CHAR* fname);
00101 };
00102 #endif