Changeset 512


Ignore:
Timestamp:
Feb 18, 2006, 4:06:11 PM (16 years ago)
Author:
Peter
Message:

moved common member variables to base class Kernel

Location:
trunk/lib/classifier
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/classifier/Kernel.h

    r451 r512  
    3535    /// Default constructor
    3636    ///
    37     Kernel(void) {};
     37    //Kernel(void) {};
    3838
    3939    ///
     
    4747    ///   sample. @note Can not handle NaNs.
    4848    ///
    49     Kernel(const gslapi::matrix&, const KernelFunction&) {};
     49    Kernel(const gslapi::matrix& data, const KernelFunction& kf)
     50      : data_(data), kf_(&kf) {};
    5051   
    5152    ///
     
    6667   
    6768  protected:
     69    const gslapi::matrix& data_;
     70    const KernelFunction* kf_;
    6871
    6972  }; // class Kernel
  • trunk/lib/classifier/Kernel_MEV.h

    r475 r512  
    2929   
    3030    ///
    31     ///  Default constructor (not implemented)
    32     ///
    33     Kernel_MEV(void);
    34 
    35     ///
    3631    ///   Constructor taking the data matrix and KernelFunction as
    3732    ///   input.Each column in the data matrix corresponds to one
     
    3934    ///
    4035    inline Kernel_MEV(const gslapi::matrix& data, const KernelFunction& kf)
    41       : Kernel(data,kf), data_(data), kf_(&kf) {}
     36      : Kernel(data,kf) {}
    4237
    4338    ///
     
    7267
    7368  private:
    74     const gslapi::matrix& data_;
    75     const KernelFunction* kf_;
    7669
    7770  }; // class Kernel_MEV
  • trunk/lib/classifier/Kernel_SEV.cc

    r451 r512  
    1313
    1414Kernel_SEV::Kernel_SEV(const gslapi::matrix& data, const KernelFunction& kf)
    15   : Kernel(data,kf), data_(data), kf_(&kf)
     15  : Kernel(data,kf)
    1616{
    1717  kernel_matrix_ = gslapi::matrix(data.columns(),data.columns());
  • trunk/lib/classifier/Kernel_SEV.h

    r451 r512  
    6363
    6464  private:
    65     const gslapi::matrix& data_;
    66     const KernelFunction* kf_;
    6765    gslapi::matrix kernel_matrix_;
    6866
Note: See TracChangeset for help on using the changeset viewer.