SparsePreProc.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 "features/SparseFeatures.h"
00015 #include "lib/common.h"
00016 #include "preproc/PreProc.h"
00017 
00018 #include <stdio.h>
00019 
00020 namespace shogun
00021 {
00022 template <class ST> class TSparse;
00023 template <class ST> class CSparseFeatures;
00024 
00033 template <class ST> class CSparsePreProc : public CPreProc
00034 {
00035 public:
00041     CSparsePreProc(const char *name, const char* id) : CPreProc(name,id)
00042     {
00043     }
00044 
00048     virtual TSparse<ST>* apply_to_sparse_feature_matrix(CSparseFeatures<ST>* f)=0;
00049 
00052     virtual TSparse<ST>* apply_to_sparse_feature_vector(TSparse<ST>* f, int32_t &len)=0;
00053 
00055   inline virtual EFeatureClass get_feature_class() { return C_SPARSE; }
00056   
00057 };
00058 }
00059 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation