00001 #ifndef _theplu_yat_classifier_polynomial_kernel_function_ 00002 #define _theplu_yat_classifier_polynomial_kernel_function_ 00003 00004 // $Id: PolynomialKernelFunction.h 2119 2009-12-12 23:11:43Z peter $ 00005 00006 /* 00007 Copyright (C) 2003 Peter Johansson 00008 Copyright (C) 2004, 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson 00009 00010 This file is part of the yat library, http://dev.thep.lu.se/yat 00011 00012 The yat library is free software; you can redistribute it and/or 00013 modify it under the terms of the GNU General Public License as 00014 published by the Free Software Foundation; either version 3 of the 00015 License, or (at your option) any later version. 00016 00017 The yat library is distributed in the hope that it will be useful, 00018 but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 General Public License for more details. 00021 00022 You should have received a copy of the GNU General Public License 00023 along with yat. If not, see <http://www.gnu.org/licenses/>. 00024 */ 00025 00026 #include "KernelFunction.h" 00027 00028 #include <cmath> 00029 00030 namespace theplu { 00031 namespace yat { 00032 namespace classifier { 00033 00034 class DataLookup1D; 00035 00039 00040 00041 class PolynomialKernelFunction : public KernelFunction 00042 { 00043 00044 public: 00049 PolynomialKernelFunction(int = 1); 00050 00054 virtual ~PolynomialKernelFunction(void) {}; 00055 00061 double operator()(const DataLookup1D& a1, const DataLookup1D& a2) const; 00062 00068 double operator()(const DataLookup1D& x, 00069 const DataLookupWeighted1D& y) const; 00078 double operator()(const DataLookupWeighted1D& x, 00079 const DataLookupWeighted1D& y) const; 00080 00081 00082 private: 00083 int order_; 00084 00085 }; // class PolynomialKernelFunction 00086 00087 }}} // of namespace classifier, yat, and theplu 00088 00089 #endif