CharFeatures.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 1999-2008 Soeren Sonnenburg
00008  * Copyright (C) 1999-2008 Fraunhofer Institute FIRST and Max-Planck-Society
00009  */
00010 
00011 #ifndef _CHARFEATURES__H__
00012 #define _CHARFEATURES__H__
00013 
00014 #include "features/SimpleFeatures.h"
00015 #include "features/Alphabet.h"
00016 #include "lib/common.h"
00017 
00019 class CCharFeatures : public CSimpleFeatures<CHAR>
00020 {
00021     public:
00027         CCharFeatures(E_ALPHABET alpha, INT size=0);
00028 
00034         CCharFeatures(CAlphabet* alpha, INT size=0);
00035 
00037         CCharFeatures(const CCharFeatures & orig);
00038 
00046         CCharFeatures(E_ALPHABET alphabet, CHAR* feature_matrix, INT num_feat, INT num_vec);
00047 
00053         CCharFeatures(E_ALPHABET alphabet, CHAR* fname);
00054 
00055         ~CCharFeatures();
00056 
00061         inline CAlphabet* get_alphabet()
00062         {
00063             return alphabet;
00064         }
00065 
00074         inline virtual void copy_feature_matrix(CHAR* src, INT num_feat, INT num_vec)
00075         {
00076             CSimpleFeatures<CHAR>::copy_feature_matrix(src, num_feat, num_vec);
00077         }
00078 
00084         virtual bool load(CHAR* fname);
00085 
00091         virtual bool save(CHAR* fname);
00092 
00093     protected:
00095         CAlphabet* alphabet;
00096 };
00097 #endif

SHOGUN Machine Learning Toolbox - Documentation