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-2008 Soeren Sonnenburg
00008  * Copyright (C) 1999-2008 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 template <class ST> class TSparse;
00021 template <class ST> class CSparseFeatures;
00022 
00031 template <class ST> class CSparsePreProc : public CPreProc
00032 {
00033 public:
00039     CSparsePreProc(const char *name, const char* id) : CPreProc(name,id)
00040     {
00041     }
00042 
00046     virtual TSparse<ST>* apply_to_sparse_feature_matrix(CSparseFeatures<ST>* f)=0;
00047 
00050     virtual TSparse<ST>* apply_to_sparse_feature_vector(TSparse<ST>* f, int32_t &len)=0;
00051 
00053   inline virtual EFeatureClass get_feature_class() { return C_SPARSE; }
00054   
00055 };
00056 #endif

SHOGUN Machine Learning Toolbox - Documentation