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) 2009 Soeren Sonnenburg 00008 * Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society 00009 */ 00010 00011 #ifndef _DUMMYFEATURES__H__ 00012 #define _DUMMYFEATURES__H__ 00013 00014 #include "lib/common.h" 00015 #include "features/Features.h" 00016 00017 namespace shogun 00018 { 00023 class CDummyFeatures : public CFeatures 00024 { 00025 public: 00030 CDummyFeatures(int32_t num) : CFeatures(0), num_vectors(num) 00031 { 00032 } 00033 00035 CDummyFeatures(const CDummyFeatures &orig) : CFeatures(0), 00036 num_vectors(orig.num_vectors) 00037 { 00038 } 00039 00041 virtual ~CDummyFeatures() 00042 { 00043 } 00044 00046 virtual int32_t get_num_vectors() 00047 { 00048 return num_vectors; 00049 } 00050 00052 virtual int32_t get_size() 00053 { 00054 return 1; 00055 } 00056 00058 virtual CFeatures* duplicate() const 00059 { 00060 return new CDummyFeatures(*this); 00061 } 00062 00064 inline EFeatureType get_feature_type() 00065 { 00066 return F_ANY; 00067 } 00068 00070 inline virtual EFeatureClass get_feature_class() 00071 { 00072 return C_ANY; 00073 } 00074 00076 inline virtual const char* get_name() const { return "DummyFeatures"; } 00077 00078 protected: 00080 int32_t num_vectors; 00081 }; 00082 } 00083 #endif