Ignore:
Timestamp:
Feb 18, 2006, 5:02:43 PM (16 years ago)
Author:
Peter
Message:

added kernels using weights

File:
1 edited

Legend:

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

    r512 r513  
    44#define _theplu_classifier_kernel_
    55
     6#include <c++_tools/gslapi/matrix.h>
     7
    68#include <cctype>
    79
    810namespace theplu {
    9 
    10 namespace gslapi {
    11   class matrix;
    12 }
    13 
    1411namespace classifier {
    1512
     
    3330
    3431    ///
    35     /// Default constructor
    36     ///
    37     //Kernel(void) {};
    38 
    39     ///
    40     /// Copy constructor (not implemented)
    41     ///
    42     Kernel(const Kernel&);
    43 
    44     ///
    4532    ///   Constructor taking the data matrix and KernelFunction as
    4633    ///   input.Each column in the data matrix corresponds to one
    47     ///   sample. @note Can not handle NaNs.
     34    ///   sample.
     35    ///
     36    ///   @note Can not handle NaNs.
    4837    ///
    4938    Kernel(const gslapi::matrix& data, const KernelFunction& kf)
    5039      : data_(data), kf_(&kf) {};
    5140   
     41    ///
     42    /// Constructor using weights
     43    ///
     44    Kernel(const gslapi::matrix& data, const KernelFunction& kf,
     45           const gslapi::matrix& weights)
     46      : data_(data), kf_(&kf) {};
     47   
    5248    ///
    5349    ///   Destructor
     
    6460    /// @brief number of samples
    6561    ///
    66     virtual size_t size(void) const=0;
    67    
     62    inline size_t size(void) const { return data_.columns(); }
     63
    6864  protected:
    6965    const gslapi::matrix& data_;
    7066    const KernelFunction* kf_;
     67
     68  private:
     69    ///
     70    /// Copy constructor (not implemented)
     71    ///
     72    Kernel(const Kernel&);
     73
    7174
    7275  }; // class Kernel
Note: See TracChangeset for help on using the changeset viewer.