MultiquadricKernel.h

Go to the documentation of this file.
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 Joanna Stocka
00008  * Copyright (C) 2007-2011 Fraunhofer Institute FIRST and Max-Planck-Society
00009  */
00010 
00011 #include <shogun/lib/config.h>
00012 
00013 #ifndef MULTIQUADRIC_H_
00014 #define MULTIQUADRIC_H_
00015 
00016 #include <shogun/lib/common.h>
00017 #include <shogun/kernel/Kernel.h>
00018 #include <shogun/distance/Distance.h>
00019 
00020 namespace shogun
00021 {
00022 
00023 class CDistance;
00030 class CMultiquadricKernel: public CKernel
00031 {
00032 public:
00034     CMultiquadricKernel();
00035 
00041     CMultiquadricKernel(int32_t cache, float64_t coef, CDistance* dist);
00042 
00049     CMultiquadricKernel(CFeatures *l, CFeatures *r, float64_t coef, CDistance* dist);
00050 
00056     virtual bool init(CFeatures* l, CFeatures* r);
00057 
00061     virtual EKernelType get_kernel_type() { return K_MULTIQUADRIC; }
00062 
00066     virtual EFeatureType get_feature_type() { return m_distance->get_feature_type(); }
00067 
00071     virtual EFeatureClass get_feature_class() { return m_distance->get_feature_class(); }
00072 
00076     virtual const char* get_name() const { return "Multiquadric"; }
00077 
00081     inline float64_t get_coef() { return m_coef; }
00082 
00086     inline void set_coef(float64_t value) { m_coef = value; }
00087 
00088     virtual ~CMultiquadricKernel();
00089 
00090 protected:
00098     virtual float64_t compute(int32_t idx_a, int32_t idx_b);
00099 
00100 private:
00101     void init();
00102 
00103 protected:
00104 
00106     CDistance* m_distance;
00107 
00109     float64_t m_coef;
00110 
00111 };
00112 }
00113 
00114 #endif /* MULTIQUADRIC_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation