Changeset 206


Ignore:
Timestamp:
Nov 2, 2004, 7:31:09 PM (19 years ago)
Author:
Peter
Message:

.

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Regression.h

    r202 r206  
    4949    /// to the inverse of the variance for \f$ y_i \f$
    5050    ///
    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;
    5453
    5554         
  • trunk/src/RegressionLocal.cc

    r202 r206  
    33#include "RegressionLocal.h"
    44
    5 
     5#include "Regression.h"
     6#include "RegressionKernel.h"
    67#include "RegressionLinear.h"
    78#include "vector.h"
     
    910
    1011namespace theplu {
    11 namespace cpptools {
     12namespace statistics {
    1213
    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  }
    1421
    1522
  • trunk/src/RegressionLocal.h

    r202 r206  
    66// C++ tools include
    77/////////////////////
     8#include "Regression.h"
     9#include "RegressionKernel.h"
    810#include "vector.h"
    911
     
    1517namespace statistics { 
    1618 
    17   class RegressionKernel;
    18   class Regression;
    19 
    20 
     19 
    2120  ///
    2221  /// Class for Locally-weighted regression.   
     
    3332
    3433    ///
    35     /// Constructor.
     34    /// Constructor doing the thing.
    3635    ///
    37     RegressionLocal(Regression&, const RegressionKernel&);
     36    RegressionLocal(const gslapi::vector& x, const gslapi::vector& y,
     37                    const Regression&, const RegressionKernel&);
    3838
    3939    ///
     
    4646    ///
    4747    virtual ~RegressionLocal(void) {};
    48          
     48
    4949         
    5050  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   
    5258  };
    5359
  • trunk/src/RegressionNaive.h

    r204 r206  
    6262    /// variance for \f$ y_i \f$
    6363    ///
    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)
    6567    {
    6668      WeightedAverager a;
Note: See TracChangeset for help on using the changeset viewer.