RealFeatures.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  * Written (W) 1999-2008 Gunnar Raetsch
00009  * Written (W) 1999-2007 Fabio De Bona
00010  * Copyright (C) 1999-2008 Fraunhofer Institute FIRST and Max-Planck-Society
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

SHOGUN Machine Learning Toolbox - Documentation