Changeset 206
 Timestamp:
 Nov 2, 2004, 7:31:09 PM (19 years ago)
 Location:
 trunk/src
 Files:

 4 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/Regression.h
r202 r206 49 49 /// to the inverse of the variance for \f$ y_i \f$ 50 50 /// 51 virtual int 52 fit_weighted(const gslapi::vector& x, const gslapi::vector& y, 53 const gslapi::vector& w)=0; 51 virtual int fit_weighted(const gslapi::vector& x, const gslapi::vector& y, 52 const gslapi::vector& w)=0; 54 53 55 54 
trunk/src/RegressionLocal.cc
r202 r206 3 3 #include "RegressionLocal.h" 4 4 5 5 #include "Regression.h" 6 #include "RegressionKernel.h" 6 7 #include "RegressionLinear.h" 7 8 #include "vector.h" … … 9 10 10 11 namespace theplu { 11 namespace cpptools {12 namespace statistics { 12 13 13 14 RegressionLocal::RegressionLocal(const gslapi::vector& x, 15 const gslapi::vector& y, 16 const Regression& r, 17 const RegressionKernel& k) 18 : kernel_(&k), regression_(&r) 19 { 20 } 14 21 15 22 
trunk/src/RegressionLocal.h
r202 r206 6 6 // C++ tools include 7 7 ///////////////////// 8 #include "Regression.h" 9 #include "RegressionKernel.h" 8 10 #include "vector.h" 9 11 … … 15 17 namespace statistics { 16 18 17 class RegressionKernel; 18 class Regression; 19 20 19 21 20 /// 22 21 /// Class for Locallyweighted regression. … … 33 32 34 33 /// 35 /// Constructor .34 /// Constructor doing the thing. 36 35 /// 37 RegressionLocal(Regression&, const RegressionKernel&); 36 RegressionLocal(const gslapi::vector& x, const gslapi::vector& y, 37 const Regression&, const RegressionKernel&); 38 38 39 39 /// … … 46 46 /// 47 47 virtual ~RegressionLocal(void) {}; 48 48 49 49 50 50 private: 51 51 gslapi::vector data_x_; 52 gslapi::vector data_y_; 53 const RegressionKernel* kernel_; 54 const Regression* regression_; 55 gslapi::vector estimated_x_; 56 gslapi::vector estimated_y_; 57 52 58 }; 53 59 
trunk/src/RegressionNaive.h
r204 r206 62 62 /// variance for \f$ y_i \f$ 63 63 /// 64 inline int fit_weighted(gslapi::vector x,gslapi::vector y,gslapi::vector w) 64 inline int fit_weighted(const gslapi::vector& x, 65 const gslapi::vector& y, 66 const gslapi::vector& w) 65 67 { 66 68 WeightedAverager a;
Note: See TracChangeset
for help on using the changeset viewer.