PreProc.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-2008 Soeren Sonnenburg
00008  * Written (W) 1999-2008 Gunnar Raetsch
00009  * Copyright (C) 1999-2008 Fraunhofer Institute FIRST and Max-Planck-Society
00010  */
00011 
00012 #ifndef _CPREPROC__H__
00013 #define _CPREPROC__H__
00014 
00015 #include "lib/common.h"
00016 #include "base/SGObject.h"
00017 
00018 
00019 enum EPreProcType
00020 {
00021     P_UNKNOWN=0,
00022     P_NORMONE=10,
00023     P_LOGPLUSONE=20,
00024     P_SORTWORDSTRING=30,
00025     P_SORTULONGSTRING=40,
00026     P_SORTWORD=50,
00027     P_PRUNEVARSUBMEAN=60
00028 };
00029 
00030 
00031 #include "features/Features.h"
00032 class CFeatures;
00033 
00034 
00048 class CPreProc : public CSGObject
00049 {
00050 public:
00056     CPreProc(const char* name, const char* id);
00057     virtual ~CPreProc();
00058 
00060     virtual bool init(CFeatures* f)=0;
00061     
00063     virtual bool load_init_data(FILE* src)=0;
00064 
00066     virtual bool save_init_data(FILE* dst)=0;
00067 
00069     virtual void cleanup()=0;
00070     
00073     virtual EFeatureType get_feature_type()=0;
00074 
00078     virtual EFeatureClass get_feature_class()=0;
00079 
00081     const char * get_name() const { return preproc_name; }
00082     
00084     const char * get_id() const { return preproc_id; }
00085 
00086  protected:
00088     const char* preproc_name;
00090     const char* preproc_id;
00091 };
00092 #endif

SHOGUN Machine Learning Toolbox - Documentation