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 #include "yat/utility/Vector.h"
00027
00028 #include <iostream>
00029
00030 namespace theplu {
00031 namespace yat {
00032 namespace regression {
00033
00034 class Kernel;
00035 class OneDimensionalWeighted;
00036
00048 class Local
00049 {
00050
00051 public:
00056 Local(OneDimensionalWeighted& r, Kernel& k);
00057
00061 virtual ~Local(void);
00062
00066 void add(const double x, const double y);
00067
00075 void fit(const size_t step_size, const size_t nof_points);
00076
00082 void reset(void);
00083
00087 const utility::Vector& x(void) const;
00088
00092 const utility::Vector& y_predicted(void) const;
00093
00097 const utility::Vector& y_err(void) const;
00098
00099 private:
00103 Local(const Local&);
00104
00105 std::vector<std::pair<double, double> > data_;
00106 Kernel* kernel_;
00107 OneDimensionalWeighted* regressor_;
00108 utility::Vector x_;
00109 utility::Vector y_predicted_;
00110 utility::Vector y_err_;
00111 };
00112
00116 std::ostream& operator<<(std::ostream&, const Local& );
00117
00118 }}}
00119
00120 #endif