source: trunk/lib/svm/Kernel.h @ 350

Last change on this file since 350 was 350, checked in by Peter, 18 years ago

modified so dox comes to todo list

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1// $Id: Kernel.h 350 2005-06-08 19:19:51Z peter $
2
3#ifndef _theplu_svm_kernel_
4#define _theplu_svm_kernel_
5
6#include <cctype>
7
8namespace theplu {
9
10namespace gslapi {
11  class matrix;
12}
13
14namespace svm {
15
16  class KernelFunction;
17
18  ///
19  ///   @brief Base Class for Kernels.
20  ///
21  ///   Class taking care of the \f$NxN\f$ kernel matrix, where
22  ///   \f$N\f$ is number of samples. Each element in the Kernel
23  ///   matrix is the scalar product of the corresponding pair of
24  ///   samples. Type of Kernel is defined by a KernelFunction.
25  ///   
26  ///   @note If the KernelFunction is destroyed, the Kernel is no
27  ///   longer defined.
28  ///
29  class Kernel
30  {
31   
32  public:
33
34    ///
35    /// Default constructor
36    ///
37    Kernel(void) {};
38
39    ///
40    /// Copy constructor (not implemented)
41    ///
42    Kernel(const Kernel&);
43
44    ///
45    ///   Constructor taking the data matrix and KernelFunction as
46    ///   input.Each column in the data matrix corresponds to one
47    ///   sample. @note Can not handle NaNs.
48    ///
49    Kernel(const gslapi::matrix&, const KernelFunction&) {};
50   
51    ///
52    ///   @todo Constructor taking the \a data matrix, the KernelFunction and a
53    ///   \a weight matrix as input. Each column in the data matrix
54    ///   corresponds to one sample.
55    Kernel(const gslapi::matrix& data, const KernelFunction&, 
56           const gslapi::matrix& weight);
57
58    ///
59    ///   Destructor
60    ///
61    virtual ~Kernel(void) {};
62
63    ///
64    /// @return element at position (\a row, \a column) of the Kernel
65    /// matrix
66    ///
67    virtual double operator()(const size_t row,const size_t column) const=0;
68
69    ///
70    /// @brief number of samples
71    ///
72    virtual size_t size(void) const=0;
73   
74  protected:
75
76  }; // class Kernel
77
78}} // of namespace svm and namespace theplu
79
80#endif
Note: See TracBrowser for help on using the repository browser.