source: trunk/c++_tools/statistics/KernelTriCube.cc @ 575

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

moved kernel to regression namespace and tried to fix some dox issues

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 458 bytes
Line 
1// $Id: KernelTriCube.cc 389 2005-08-15 11:37:07Z peter $
2
3#include <c++_tools/statistics/KernelTriCube.h>
4#include <c++_tools/statistics/Kernel.h>
5
6#include <cmath>
7
8namespace theplu {
9namespace statistics {
10namespace regression {
11
12  KernelTriCube::KernelTriCube(void)
13    : Kernel()
14  {
15  }
16
17  double KernelTriCube::weight(const double x) const
18  {
19    if (x>1 || x<-1)
20      return 0.0;
21    else
22      return pow(1-pow(fabs(x),3),3);
23  }
24
25} // of namespace regression
26} // of namespace statistics
27} // of namespace theplu
28
Note: See TracBrowser for help on using the repository browser.