source: trunk/yat/classifier/KernelFunction.h

Last change on this file was 2119, checked in by Peter, 12 years ago

converted files to utf-8. fixes #577

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