ByteFeatures.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _BYTEFEATURES__H__
00012 #define _BYTEFEATURES__H__
00013
00014 #include "features/SimpleFeatures.h"
00015 #include "features/CharFeatures.h"
00016 #include "features/Alphabet.h"
00017 #include "lib/common.h"
00018
00020 class CByteFeatures : public CSimpleFeatures<BYTE>
00021 {
00022 public:
00028 CByteFeatures(E_ALPHABET alpha, INT size=0);
00029
00035 CByteFeatures(CAlphabet* alpha, INT size=0);
00036
00038 CByteFeatures(const CByteFeatures & orig);
00039
00047 CByteFeatures(E_ALPHABET alphabet, BYTE* feature_matrix, INT num_feat, INT num_vec);
00048
00054 CByteFeatures(E_ALPHABET alphabet, CHAR* fname);
00055
00056 ~CByteFeatures();
00057
00062 inline CAlphabet* get_alphabet()
00063 {
00064 return alphabet;
00065 }
00066
00075 inline virtual void copy_feature_matrix(BYTE* src, INT num_feat, INT num_vec)
00076 {
00077 CSimpleFeatures<BYTE>::copy_feature_matrix(src, num_feat, num_vec);
00078 }
00079
00084 virtual EFeatureType get_feature_type() { return F_BYTE; }
00085
00091 virtual bool load(CHAR* fname);
00092
00098 virtual bool save(CHAR* fname);
00099
00100 protected:
00102 CAlphabet* alphabet;
00103 };
00104 #endif