SparsePreprocessor.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  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
00009  */
00010 
00011 #ifndef _CSPARSEPREPROC__H__
00012 #define _CSPARSEPREPROC__H__
00013 
00014 #include <shogun/features/SparseFeatures.h>
00015 #include <shogun/lib/common.h>
00016 #include <shogun/preprocessor/Preprocessor.h>
00017 
00018 #include <stdio.h>
00019 
00020 namespace shogun
00021 {
00022 template <class ST> class SGSparseVector;
00023 template <class ST> class CSparseFeatures;
00024 
00033 template <class ST> class CSparsePreprocessor : public CPreprocessor
00034 {
00035 public:
00038     CSparsePreprocessor() : CPreprocessor() {}
00039 
00043     virtual SGSparseVector<ST>* apply_to_sparse_feature_matrix(CSparseFeatures<ST>* f)=0;
00044 
00047     virtual SGSparseVector<ST>* apply_to_sparse_feature_vector(SGSparseVector<ST>* f, int32_t &len)=0;
00048 
00050     inline virtual EFeatureClass get_feature_class() { return C_SPARSE; }
00051 
00053     virtual inline const char* get_name() const { return "UNKNOWN"; }
00054 
00056     virtual inline EPreprocessorType get_type() const { return P_UNKNOWN; }
00057   
00058 };
00059 }
00060 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation