source: trunk/lib/classifier/Kernel_SEV.cc @ 512

Last change on this file since 512 was 512, checked in by Peter, 16 years ago

moved common member variables to base class Kernel

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 706 bytes
Line 
1// $Id: Kernel_SEV.cc 512 2006-02-18 15:06:11Z peter $
2
3#include <c++_tools/classifier/Kernel_SEV.h>
4
5#include <c++_tools/classifier/Kernel.h>
6#include <c++_tools/classifier/KernelFunction.h>
7#include <c++_tools/gslapi/matrix.h>
8#include <c++_tools/gslapi/vector.h>
9
10namespace theplu {
11namespace classifier { 
12
13
14Kernel_SEV::Kernel_SEV(const gslapi::matrix& data, const KernelFunction& kf)
15  : Kernel(data,kf)
16{
17  kernel_matrix_ = gslapi::matrix(data.columns(),data.columns());
18  for (size_t i=0; i<kernel_matrix_.rows(); i++) 
19    for (size_t j=i; j<kernel_matrix_.columns(); j++) 
20      kernel_matrix_(i,j) = kernel_matrix_(j,i) =
21        (*kf_)(gslapi::vector(data_,i,false),gslapi::vector(data_,j,false));
22}
23
24
25}} // of namespace classifier and namespace theplu
Note: See TracBrowser for help on using the repository browser.