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) 2011 Sergey Bartunov 00008 * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society 00009 * Copyright (C) 2010 Berlin Institute of Technology 00010 */ 00011 00012 #ifndef _SPLINEKERNEL_H__ 00013 #define _SPLINEKERNEL_H__ 00014 00015 #include <shogun/lib/common.h> 00016 #include <shogun/kernel/DotKernel.h> 00017 #include <shogun/features/DotFeatures.h> 00018 #include <shogun/machine/KernelMachine.h> 00019 00020 namespace shogun 00021 { 00022 class CKernelMachine; 00023 class CDotFeatures; 00024 00036 class CSplineKernel: public CDotKernel 00037 { 00038 public: 00041 CSplineKernel(); 00042 00048 CSplineKernel(CDotFeatures* l, CDotFeatures* r); 00049 00050 virtual ~CSplineKernel(); 00051 00058 virtual bool init(CFeatures* l, CFeatures* r); 00059 00061 virtual void cleanup(); 00062 00067 virtual EKernelType get_kernel_type() { return K_SPLINE; } 00068 00073 virtual const char* get_name() const { return "SplineKernel"; } 00074 00075 protected: 00076 virtual float64_t compute(int32_t idx_a, int32_t idx_b); 00077 }; 00078 } 00079 #endif /* _SPLINEKERNEL_H__ */