source: trunk/c++_tools/classifier/KernelFunction.h @ 627

Last change on this file since 627 was 627, checked in by Peter, 15 years ago

fixes #124 also extended interface of AveragerPairWeighted? supporting DataLookupWeighted1D

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date ID
File size: 1.5 KB
Line 
1// $Id$
2
3#ifndef _theplu_classifier_kernel_function_
4#define _theplu_classifier_kernel_function_
5
6namespace theplu {
7namespace classifier {
8  class DataLookup1D;
9  class DataLookupWeighted1D;
10
11  ///
12  ///   Virtual Class calculating kernel matrix.
13  ///
14  class KernelFunction
15  {
16   
17  public:
18    ///
19    /// Constructor
20    ///   
21    KernelFunction(void) {};
22
23    ///
24    /// Destructor
25    ///
26    virtual ~KernelFunction(void) {};
27   
28    ///
29    /// @return scalar product of two vector in feature space.
30    ///
31    virtual double operator()(const DataLookup1D&,
32                              const DataLookup1D&) const = 0; 
33   
34    ///
35    /// @return scalar product of two vector in feature space.
36    ///
37    virtual double operator()(const DataLookup1D&,
38                              const DataLookupWeighted1D&) const = 0; 
39   
40    ///
41    /// @return scalar product of two vector in feature space.
42    ///
43    inline double operator()(const DataLookupWeighted1D& vec_w,
44                             const DataLookup1D& vec) const 
45    { return this->operator()(vec,vec_w); } 
46   
47    ///
48    /// @return scalar product of two vector in feature space.
49    ///
50    virtual double operator()(const DataLookupWeighted1D&,
51                              const DataLookupWeighted1D&) const = 0; 
52   
53    ///
54    /// @return scalar product of two vector in feature space.
55    ///
56    virtual double operator()(const DataLookup1D&,
57                              const DataLookup1D&,
58                              const DataLookup1D&,
59                              const DataLookup1D&) const = 0; 
60   
61  }; // class KernelFunction
62
63}} // of namespace classifier and namespace theplu
64
65#endif
Note: See TracBrowser for help on using the repository browser.