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 _CNORM_ONE__H__ 00012 #define _CNORM_ONE__H__ 00013 00014 #include "preproc/SimplePreProc.h" 00015 #include "features/Features.h" 00016 #include "lib/common.h" 00017 00018 #include <stdio.h> 00019 00031 class CNormOne : public CSimplePreProc<float64_t> 00032 { 00033 public: 00035 CNormOne(); 00036 virtual ~CNormOne(); 00037 00039 virtual bool init(CFeatures* f); 00041 virtual bool load_init_data(FILE* src); 00043 virtual bool save_init_data(FILE* dst); 00045 virtual void cleanup(); 00047 virtual bool load(FILE* f); 00049 virtual bool save(FILE* f); 00050 00054 virtual float64_t* apply_to_feature_matrix(CFeatures* f); 00055 00058 virtual float64_t* apply_to_feature_vector(float64_t* f, int32_t &len); 00059 00061 inline virtual const char* get_name() { return "NormOne"; } 00062 }; 00063 #endif