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) 2008-2009 Soeren Sonnenburg 00008 * Copyright (C) 2008-2009 Fraunhofer Institute FIRST and Max-Planck-Society 00009 */ 00010 00011 #ifndef _IDENTITYKERNELNORMALIZER_H___ 00012 #define _IDENTITYKERNELNORMALIZER_H___ 00013 00014 #include <shogun/kernel/normalizer/KernelNormalizer.h> 00015 00016 namespace shogun 00017 { 00019 class CIdentityKernelNormalizer : public CKernelNormalizer 00020 { 00021 public: 00023 CIdentityKernelNormalizer() : CKernelNormalizer() 00024 { 00025 } 00026 00028 virtual ~CIdentityKernelNormalizer() 00029 { 00030 } 00031 00034 virtual bool init(CKernel* k) 00035 { 00036 return true; 00037 } 00038 00044 virtual float64_t normalize( 00045 float64_t value, int32_t idx_lhs, int32_t idx_rhs) 00046 { 00047 return value; 00048 } 00049 00054 virtual float64_t normalize_lhs(float64_t value, int32_t idx_lhs) 00055 { 00056 return value; 00057 } 00058 00063 virtual float64_t normalize_rhs(float64_t value, int32_t idx_rhs) 00064 { 00065 return value; 00066 } 00067 00069 virtual const char* get_name() const { return "IdentityKernelNormalizer"; } 00070 }; 00071 } 00072 #endif