IntFeatures.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 _INTFEATURES__H__
00012 #define _INTFEATURES__H__
00013 
00014 #include "features/SimpleFeatures.h"
00015 #include "lib/common.h"
00016 
00018 class CIntFeatures: public CSimpleFeatures<INT>
00019 {
00020     public:
00025         CIntFeatures(INT size=0) : CSimpleFeatures<INT>(size) {}
00026 
00028         CIntFeatures(const CIntFeatures & orig) :
00029             CSimpleFeatures<INT>(orig) {}
00030 
00038         inline CIntFeatures(INT* src, INT num_feat, INT num_vec): CSimpleFeatures<INT>(0)
00039         {
00040             CSimpleFeatures<INT>::copy_feature_matrix(src, num_feat, num_vec);
00041         }
00042 
00047         CIntFeatures(CHAR* fname) : CSimpleFeatures<INT>(fname)
00048         {
00049             load(fname);
00050         }
00051 
00058         inline virtual void get_fm(INT** dst, INT* d1, INT* d2)
00059         {
00060             CSimpleFeatures<INT>::get_fm(dst, d1, d2);
00061         }
00062 
00071         inline virtual void copy_feature_matrix(INT* src, INT num_feat, INT num_vec)
00072         {
00073             CSimpleFeatures<INT>::copy_feature_matrix(src, num_feat, num_vec);
00074         }
00075 
00081         virtual bool load(CHAR* fname);
00082 
00088         virtual bool save(CHAR* fname);
00089 };
00090 #endif

SHOGUN Machine Learning Toolbox - Documentation