2508 |
08 Jul 11 |
peter |
1 |
#ifndef _theplu_yat_regression_tukey_biweight_ |
2508 |
08 Jul 11 |
peter |
2 |
#define _theplu_yat_regression_tukey_biweight_ |
2508 |
08 Jul 11 |
peter |
3 |
|
2508 |
08 Jul 11 |
peter |
// $Id$ |
2508 |
08 Jul 11 |
peter |
5 |
|
2508 |
08 Jul 11 |
peter |
6 |
/* |
2508 |
08 Jul 11 |
peter |
Copyright (C) 2011 Peter Johansson |
2508 |
08 Jul 11 |
peter |
8 |
|
2508 |
08 Jul 11 |
peter |
This file is part of the yat library, http://dev.thep.lu.se/yat |
2508 |
08 Jul 11 |
peter |
10 |
|
2508 |
08 Jul 11 |
peter |
The yat library is free software; you can redistribute it and/or |
2508 |
08 Jul 11 |
peter |
modify it under the terms of the GNU General Public License as |
2508 |
08 Jul 11 |
peter |
published by the Free Software Foundation; either version 3 of the |
2508 |
08 Jul 11 |
peter |
License, or (at your option) any later version. |
2508 |
08 Jul 11 |
peter |
15 |
|
2508 |
08 Jul 11 |
peter |
The yat library is distributed in the hope that it will be useful, |
2508 |
08 Jul 11 |
peter |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2508 |
08 Jul 11 |
peter |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2508 |
08 Jul 11 |
peter |
General Public License for more details. |
2508 |
08 Jul 11 |
peter |
20 |
|
2508 |
08 Jul 11 |
peter |
You should have received a copy of the GNU General Public License |
2508 |
08 Jul 11 |
peter |
along with yat. If not, see <http://www.gnu.org/licenses/>. |
2508 |
08 Jul 11 |
peter |
23 |
*/ |
2508 |
08 Jul 11 |
peter |
24 |
|
2508 |
08 Jul 11 |
peter |
25 |
#include "Kernel.h" |
2508 |
08 Jul 11 |
peter |
26 |
|
2508 |
08 Jul 11 |
peter |
27 |
namespace theplu { |
2508 |
08 Jul 11 |
peter |
28 |
namespace yat { |
2508 |
08 Jul 11 |
peter |
29 |
namespace regression { |
2508 |
08 Jul 11 |
peter |
30 |
|
2508 |
08 Jul 11 |
peter |
31 |
/** |
2508 |
08 Jul 11 |
peter |
Functor returning \f$ (1-x^2)^2 \f$ if |x|<1 and 0 otherwise. |
2508 |
08 Jul 11 |
peter |
33 |
*/ |
2508 |
08 Jul 11 |
peter |
34 |
class TukeyBiweight : public Kernel |
2508 |
08 Jul 11 |
peter |
35 |
{ |
2508 |
08 Jul 11 |
peter |
36 |
public: |
2508 |
08 Jul 11 |
peter |
37 |
/** |
2508 |
08 Jul 11 |
peter |
\return \f$ (1-x^2)^2 \f$ if |x|<1 and 0 otherwise. |
2508 |
08 Jul 11 |
peter |
39 |
*/ |
2508 |
08 Jul 11 |
peter |
40 |
double operator()(const double x) const; |
2508 |
08 Jul 11 |
peter |
41 |
}; |
2508 |
08 Jul 11 |
peter |
42 |
|
2508 |
08 Jul 11 |
peter |
43 |
}}} // of namespaces regression, yat, and theplu |
2508 |
08 Jul 11 |
peter |
44 |
|
2508 |
08 Jul 11 |
peter |
45 |
#endif |