ShortRealFeatures.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) 2008 Soeren Sonnenburg
00008  * Copyright (C) 2008 Fraunhofer Institute FIRST and Max-Planck-Society
00009  */
00010 
00011 #ifndef _SHORTREALFEATURES__H__
00012 #define _SHORTREALFEATURES__H__
00013 
00014 #include "features/SimpleFeatures.h"
00015 #include "lib/common.h"
00016 
00018 class CShortRealFeatures: public CSimpleFeatures<SHORTREAL>
00019 {
00020     public:
00025         CShortRealFeatures(INT size=0) : CSimpleFeatures<SHORTREAL>(size) {}
00026 
00028         CShortRealFeatures(const CShortRealFeatures & orig) :
00029             CSimpleFeatures<SHORTREAL>(orig) {}
00030 
00038         inline CShortRealFeatures(SHORTREAL* src, INT num_feat, INT num_vec) :
00039             CSimpleFeatures<SHORTREAL>(0)
00040         {
00041             CSimpleFeatures<SHORTREAL>::copy_feature_matrix(src, num_feat, num_vec);
00042         }
00043 
00048         CShortRealFeatures(CHAR* fname) : CSimpleFeatures<SHORTREAL>(fname)
00049         {
00050             load(fname);
00051         }
00052 
00059         inline virtual void get_fm(SHORTREAL** dst, INT* d1, INT* d2)
00060         {
00061             CSimpleFeatures<SHORTREAL>::get_fm(dst, d1, d2);
00062         }
00063 
00072         inline virtual void copy_feature_matrix(SHORTREAL* src, INT num_feat, INT num_vec)
00073         {
00074             CSimpleFeatures<SHORTREAL>::copy_feature_matrix(src, num_feat, num_vec);
00075         }
00076 
00082         virtual bool load(CHAR* fname);
00083 
00089         virtual bool save(CHAR* fname);
00090 };
00091 #endif

SHOGUN Machine Learning Toolbox - Documentation