yat/regression/TukeyBiweight.h

Code
Comments
Other
Rev Date Author Line
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 4 // $Id$
2508 08 Jul 11 peter 5
2508 08 Jul 11 peter 6 /*
2508 08 Jul 11 peter 7   Copyright (C) 2011 Peter Johansson
2508 08 Jul 11 peter 8
2508 08 Jul 11 peter 9   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 11   The yat library is free software; you can redistribute it and/or
2508 08 Jul 11 peter 12   modify it under the terms of the GNU General Public License as
2508 08 Jul 11 peter 13   published by the Free Software Foundation; either version 3 of the
2508 08 Jul 11 peter 14   License, or (at your option) any later version.
2508 08 Jul 11 peter 15
2508 08 Jul 11 peter 16   The yat library is distributed in the hope that it will be useful,
2508 08 Jul 11 peter 17   but WITHOUT ANY WARRANTY; without even the implied warranty of
2508 08 Jul 11 peter 18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2508 08 Jul 11 peter 19   General Public License for more details.
2508 08 Jul 11 peter 20
2508 08 Jul 11 peter 21   You should have received a copy of the GNU General Public License
2508 08 Jul 11 peter 22   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 32      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 38        \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