Ignore:
Timestamp:
Dec 15, 2005, 6:11:29 PM (17 years ago)
Author:
Peter
Message:

added copy constructor for KernelView? and added construction of KernelView? in test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/svm/KernelView.cc

    r336 r446  
    99namespace svm { 
    1010
    11 KernelView::KernelView(const Kernel& kernel, const std::vector<size_t>& index)
    12   : Kernel(), kernel_(&kernel), index_(index)
    13 {
    14   // to view into the original kernel rather than a view
    15   //if (kernel.is_view()){
    16   //  kernel_=kernel.kernel_;
    17   //  for (size_t i=0; i<index.size(); i++)
    18   //    index_[i]=kernel.index_[index[i]];
    19   //}
    20 }
     11  KernelView::KernelView(const Kernel& kernel, const std::vector<size_t>& index)
     12    : Kernel(), kernel_(&kernel), index_(index)
     13  {
     14  }
     15 
     16  KernelView::KernelView(const KernelView& other)
     17    : Kernel(), kernel_(other.kernel_), index_(other.index_)
     18  {
     19  }
    2120
    22 KernelView::~KernelView(void)
    23 {
    24 
     21    KernelView::~KernelView(void)
     22  {
     23 
    2524
    2625}} // of namespace svm and namespace theplu
Note: See TracChangeset for help on using the changeset viewer.