source: trunk/lib/svm/Kernel_SEV.cc @ 330

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

added an abstract base class for Kernel from which Kernel_SEV Kernel_MEV are inherited. Also added a separate class for viewing into subKernels

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