DummyFeatures.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 _DUMMYFEATURES__H__
00012 #define _DUMMYFEATURES__H__
00013 
00014 #include "lib/common.h"
00015 #include "features/Features.h"
00016 
00018 class CDummyFeatures : public CFeatures
00019 {
00020     public:
00025         CDummyFeatures(int32_t num) : CFeatures(0), num_vectors(num)
00026         {
00027         }
00028 
00030         CDummyFeatures(const CDummyFeatures &orig) : CFeatures(0),
00031             num_vectors(orig.num_vectors)
00032         {
00033         }
00034 
00036         virtual ~CDummyFeatures()
00037         {
00038         }
00039 
00041         virtual int32_t get_num_vectors()
00042         {
00043             return num_vectors;
00044         }
00045 
00047         virtual int32_t get_size()
00048         {
00049             return 1;
00050         }
00051 
00053         virtual CFeatures* duplicate() const
00054         {
00055             return new CDummyFeatures(*this);
00056         }
00057 
00059         inline EFeatureType get_feature_type()
00060         {
00061             return F_ANY;
00062         }
00063 
00065         inline virtual EFeatureClass get_feature_class()
00066         {
00067             return C_ANY;
00068         }
00069 
00070     protected:
00072         int32_t num_vectors;
00073 };
00074 #endif

SHOGUN Machine Learning Toolbox - Documentation