source: trunk/lib/statistics/KernelTriCube.cc @ 389

Last change on this file since 389 was 389, checked in by Peter, 18 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
RevLine 
[281]1// $Id: KernelTriCube.cc 389 2005-08-15 11:37:07Z peter $
2
[295]3#include <c++_tools/statistics/KernelTriCube.h>
4#include <c++_tools/statistics/Kernel.h>
[281]5
6#include <cmath>
7
8namespace theplu {
9namespace statistics {
[389]10namespace regression {
[281]11
[295]12  KernelTriCube::KernelTriCube(void)
13    : Kernel()
[281]14  {
15  }
16
[295]17  double KernelTriCube::weight(const double x) const
[281]18  {
19    if (x>1 || x<-1)
20      return 0.0;
21    else
[282]22      return pow(1-pow(fabs(x),3),3);
[281]23  }
24
[389]25} // of namespace regression
26} // of namespace statistics
27} // of namespace theplu
28
Note: See TracBrowser for help on using the repository browser.