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 _CSORTULONGSTRING__H__ 00012 #define _CSORTULONGSTRING__H__ 00013 00014 #include <shogun/features/StringFeatures.h> 00015 #include <shogun/preprocessor/StringPreprocessor.h> 00016 #include <shogun/lib/common.h> 00017 00018 #include <stdio.h> 00019 namespace shogun 00020 { 00028 class CSortUlongString : public CStringPreprocessor<uint64_t> 00029 { 00030 public: 00032 CSortUlongString(); 00033 00035 virtual ~CSortUlongString(); 00036 00038 virtual bool init(CFeatures* f); 00040 virtual void cleanup(); 00042 virtual bool load(FILE* f); 00044 virtual bool save(FILE* f); 00045 00049 virtual bool apply_to_string_features(CFeatures* f); 00050 00053 virtual uint64_t* apply_to_string(uint64_t* f, int32_t &len); 00054 00056 virtual inline const char* get_name() const { return "SortUlongString"; } 00057 00059 virtual inline EPreprocessorType get_type() const { return P_SORTULONGSTRING; } 00060 }; 00061 } 00062 #endif