00001 #ifndef _theplu_yat_regression_local_
00002 #define _theplu_yat_regression_local_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "yat/utility/Vector.h"
00028
00029 #include <iostream>
00030
00031 namespace theplu {
00032 namespace yat {
00033 namespace regression {
00034
00035 class Kernel;
00036 class OneDimensionalWeighted;
00037
00049 class Local
00050 {
00051
00052 public:
00057 Local(OneDimensionalWeighted& r, Kernel& k);
00058
00062 virtual ~Local(void);
00063
00067 void add(const double x, const double y);
00068
00076 void fit(const size_t step_size, const size_t nof_points);
00077
00083 void reset(void);
00084
00088 const utility::Vector& x(void) const;
00089
00093 const utility::Vector& y_predicted(void) const;
00094
00098 const utility::Vector& y_err(void) const;
00099
00100 private:
00104 Local(const Local&);
00105
00106 std::vector<std::pair<double, double> > data_;
00107 Kernel* kernel_;
00108 OneDimensionalWeighted* regressor_;
00109 utility::Vector x_;
00110 utility::Vector y_predicted_;
00111 utility::Vector y_err_;
00112 };
00113
00119 std::ostream& operator<<(std::ostream&, const Local& );
00120
00121 }}}
00122
00123 #endif