CombinedFeatures.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-2009 Soeren Sonnenburg
00008  * Written (W) 1999-2008 Gunnar Raetsch
00009  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
00010  */
00011 
00012 #ifndef _CCOMBINEDFEATURES__H__
00013 #define _CCOMBINEDFEATURES__H__
00014 
00015 #include <shogun/features/Features.h>
00016 #include <shogun/lib/List.h>
00017 
00018 namespace shogun
00019 {
00020 class CFeatures;
00021 class CList;
00022 class CListElement;
00023 
00031 class CCombinedFeatures : public CFeatures
00032 {
00033     public:
00035         CCombinedFeatures();
00037         CCombinedFeatures(const CCombinedFeatures& orig);
00038 
00043         virtual CFeatures* duplicate() const;
00044 
00046         virtual ~CCombinedFeatures();
00047 
00052         inline virtual EFeatureType get_feature_type()
00053         {
00054             return F_UNKNOWN;
00055         }
00056 
00061         inline virtual EFeatureClass get_feature_class()
00062         {
00063             return C_COMBINED;
00064         }
00065 
00070         inline virtual int32_t get_num_vectors() const
00071         {
00072             return num_vec;
00073         }
00074 
00079         virtual int32_t get_size();
00080 
00082         void list_feature_objs();
00083 
00089         bool check_feature_obj_compatibility(CCombinedFeatures* comb_feat);
00090 
00095         CFeatures* get_first_feature_obj();
00096 
00102         CFeatures* get_first_feature_obj(CListElement*& current);
00103 
00108         CFeatures* get_next_feature_obj();
00109 
00115         CFeatures* get_next_feature_obj(CListElement*& current);
00116 
00121         CFeatures* get_last_feature_obj();
00122 
00128         bool insert_feature_obj(CFeatures* obj);
00129 
00135         bool append_feature_obj(CFeatures* obj);
00136 
00141         bool delete_feature_obj();
00142 
00147         int32_t get_num_feature_obj();
00148 
00150         inline virtual const char* get_name() const { return "CombinedFeatures"; }
00151 
00152     private:
00153         void init();
00154 
00155     protected:
00157         CList* feature_list;
00158 
00162         int32_t num_vec;
00163 };
00164 }
00165 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation