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 00024 template <class ST> class CSparsePreProc : public CPreProc 00025 { 00026 public: 00032 CSparsePreProc(const CHAR *name, const CHAR* id) : CPreProc(name,id) 00033 { 00034 } 00035 00039 virtual TSparse<ST>* apply_to_sparse_feature_matrix(CSparseFeatures<ST>* f)=0; 00040 00043 virtual TSparse<ST>* apply_to_sparse_feature_vector(TSparse<ST>* f, INT &len)=0; 00044 00046 inline virtual EFeatureClass get_feature_class() { return C_SPARSE; } 00047 00048 }; 00049 #endif