source: trunk/src/RegressionKernelTriCube.cc @ 282

Last change on this file since 282 was 282, checked in by Peter, 17 years ago

bux fix in calculation of kernel weight

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