source: trunk/src/Kernel.h @ 67

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

added choice to use weights for the calculation of kernel matrix

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.1 KB
Line 
1// $Id: Kernel.h 67 2004-04-27 15:04:31Z peter $
2
3#ifndef _theplu_cpptools_kernel_
4#define _theplu_cpptools_kernel_
5
6#include "matrix.h"
7
8namespace theplu {
9namespace cpptools {
10
11  class KernelFunction;
12
13  ///
14  ///   Class calculating the \f$NxN\f$ kernel matrix from the \f$MxN\f$
15  ///   data matrix using KernelFunction. Each row in the data matrix
16  ///   corresponds to one sample.
17  ///   
18  ///
19  class Kernel
20  {
21   
22  public:
23    ///
24    ///   Constructor taking the data matrix and KernelFunction as
25    ///   input. Note: can not handle NaNs. When dealing with missing values,
26    ///   use constructor taking a weight matrix.
27    Kernel(const gslapi::matrix&, const KernelFunction&);
28   
29    ///
30    ///   Constructor taking the data matrix, the KernelFunction and a weight
31    ///   matrix as input.
32    Kernel(const gslapi::matrix&, const KernelFunction&, const gslapi::matrix&);
33
34    ///
35    ///   Destructor
36    virtual ~Kernel(void);
37
38    ///   @return Kernel matrix
39    ///
40    const gslapi::matrix& get() const {return k_;}
41   
42  private:
43    gslapi::matrix k_;
44
45  }; // class Kernel
46
47}} // of namespace cpptools and namespace theplu
48
49#endif
Note: See TracBrowser for help on using the repository browser.