yat/classifier/KernelFunction.h

Code
Comments
Other
Rev Date Author Line
680 11 Oct 06 jari 1 #ifndef _theplu_yat_classifier_kernel_function_
680 11 Oct 06 jari 2 #define _theplu_yat_classifier_kernel_function_
25 06 Aug 03 peter 3
675 10 Oct 06 jari 4 // $Id$
675 10 Oct 06 jari 5
675 10 Oct 06 jari 6 /*
831 27 Mar 07 peter 7   Copyright (C) 2003 Peter Johansson
2119 12 Dec 09 peter 8   Copyright (C) 2004 Jari Häkkinen, Peter Johansson
831 27 Mar 07 peter 9   Copyright (C) 2005 Peter Johansson
4359 23 Aug 23 peter 10   Copyright (C) 2006 Jari Häkkinen, Peter Johansson
4359 23 Aug 23 peter 11   Copyright (C) 2007 Peter Johansson
4359 23 Aug 23 peter 12   Copyright (C) 2008 Jari Häkkinen, Peter Johansson
675 10 Oct 06 jari 13
1437 25 Aug 08 peter 14   This file is part of the yat library, http://dev.thep.lu.se/yat
675 10 Oct 06 jari 15
675 10 Oct 06 jari 16   The yat library is free software; you can redistribute it and/or
675 10 Oct 06 jari 17   modify it under the terms of the GNU General Public License as
1486 09 Sep 08 jari 18   published by the Free Software Foundation; either version 3 of the
675 10 Oct 06 jari 19   License, or (at your option) any later version.
675 10 Oct 06 jari 20
675 10 Oct 06 jari 21   The yat library is distributed in the hope that it will be useful,
675 10 Oct 06 jari 22   but WITHOUT ANY WARRANTY; without even the implied warranty of
675 10 Oct 06 jari 23   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
675 10 Oct 06 jari 24   General Public License for more details.
675 10 Oct 06 jari 25
675 10 Oct 06 jari 26   You should have received a copy of the GNU General Public License
1487 10 Sep 08 jari 27   along with yat. If not, see <http://www.gnu.org/licenses/>.
675 10 Oct 06 jari 28 */
675 10 Oct 06 jari 29
42 26 Feb 04 jari 30 namespace theplu {
680 11 Oct 06 jari 31 namespace yat {
450 15 Dec 05 peter 32 namespace classifier {
527 01 Mar 06 peter 33   class DataLookup1D;
627 05 Sep 06 peter 34   class DataLookupWeighted1D;
42 26 Feb 04 jari 35
99 10 Jun 04 peter 36   ///
767 22 Feb 07 peter 37   /// @brief Interface class calculating elements in Kernel.
99 10 Jun 04 peter 38   ///
4200 19 Aug 22 peter 39   class KernelFunction
25 06 Aug 03 peter 40   {
4200 19 Aug 22 peter 41
25 06 Aug 03 peter 42   public:
99 10 Jun 04 peter 43     ///
99 10 Jun 04 peter 44     /// Constructor
4200 19 Aug 22 peter 45     ///
99 10 Jun 04 peter 46     KernelFunction(void) {};
99 10 Jun 04 peter 47
99 10 Jun 04 peter 48     ///
99 10 Jun 04 peter 49     /// Destructor
99 10 Jun 04 peter 50     ///
33 22 Jan 04 peter 51     virtual ~KernelFunction(void) {};
4200 19 Aug 22 peter 52
295 29 Apr 05 peter 53     ///
295 29 Apr 05 peter 54     /// @return scalar product of two vector in feature space.
295 29 Apr 05 peter 55     ///
527 01 Mar 06 peter 56     virtual double operator()(const DataLookup1D&,
4200 19 Aug 22 peter 57                               const DataLookup1D&) const = 0;
4200 19 Aug 22 peter 58
295 29 Apr 05 peter 59     ///
295 29 Apr 05 peter 60     /// @return scalar product of two vector in feature space.
295 29 Apr 05 peter 61     ///
627 05 Sep 06 peter 62     virtual double operator()(const DataLookup1D&,
4200 19 Aug 22 peter 63                               const DataLookupWeighted1D&) const = 0;
4200 19 Aug 22 peter 64
627 05 Sep 06 peter 65     ///
627 05 Sep 06 peter 66     /// @return scalar product of two vector in feature space.
627 05 Sep 06 peter 67     ///
627 05 Sep 06 peter 68     inline double operator()(const DataLookupWeighted1D& vec_w,
4200 19 Aug 22 peter 69                              const DataLookup1D& vec) const
4200 19 Aug 22 peter 70     { return this->operator()(vec,vec_w); }
4200 19 Aug 22 peter 71
627 05 Sep 06 peter 72     ///
627 05 Sep 06 peter 73     /// @return scalar product of two vector in feature space.
627 05 Sep 06 peter 74     ///
627 05 Sep 06 peter 75     virtual double operator()(const DataLookupWeighted1D&,
4200 19 Aug 22 peter 76                               const DataLookupWeighted1D&) const = 0;
4200 19 Aug 22 peter 77
163 22 Sep 04 peter 78   }; // class KernelFunction
25 06 Aug 03 peter 79
680 11 Oct 06 jari 80 }}} // of namespace classifier, yat, and theplu
25 06 Aug 03 peter 81
25 06 Aug 03 peter 82 #endif