Changeset 565


Ignore:
Timestamp:
Mar 16, 2006, 3:19:41 PM (16 years ago)
Author:
Peter
Message:

removed default row/column in constructors (MatrixLookup? and DataLookup1D)

Location:
trunk
Files:
9 edited

Legend:

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

    r555 r565  
    3232    ///
    3333    DataLookup1D(const DataLookup2D&, const size_t index,
    34                  const bool row_vector=true);
     34                 const bool row_vector);
    3535
    3636    ///
  • trunk/lib/classifier/KernelLookup.h

    r564 r565  
    126126    ///
    127127    inline const MatrixLookup* data(void) const
    128     { return new MatrixLookup(kernel_->data(),column_index_); }
     128    { return new MatrixLookup(kernel_->data(),column_index_,false); }
    129129
    130130
     
    163163    ///
    164164    inline const MatrixLookup* weights(void) const
    165     { return new MatrixLookup(kernel_->weights(),column_index_); }
     165    { return new MatrixLookup(kernel_->weights(),column_index_, false); }
    166166
    167167
  • trunk/lib/classifier/KernelWeighted_MEV.h

    r555 r565  
    5959    inline double element(const DataLookup1D& vec, const size_t i) const
    6060    {
    61       return (*kf_)(vec, DataLookup1D(*data_,i),
     61      return (*kf_)(vec, DataLookup1D(*data_,i,false),
    6262                    DataLookup1D(vec.size(),1.0),
    63                     DataLookup1D(*weights_,i));
     63                    DataLookup1D(*weights_,i,false));
    6464    }
    6565
     
    7070                          const size_t i) const
    7171    {
    72       return (*kf_)(vec, DataLookup1D(*data_,i),w,DataLookup1D(*weights_,i));
     72      return (*kf_)(vec, DataLookup1D(*data_,i, false),
     73                    w,DataLookup1D(*weights_,i, false));
    7374    }
    7475
  • trunk/lib/classifier/KernelWeighted_SEV.h

    r555 r565  
    6262    inline double element(const DataLookup1D& vec, const size_t i) const
    6363    {
    64       return (*kf_)(vec, DataLookup1D(*data_,i),
     64      return (*kf_)(vec, DataLookup1D(*data_,i, false),
    6565                    DataLookup1D(vec.size(),1.0),
    66                     DataLookup1D(*weights_,i));
     66                    DataLookup1D(*weights_,i, false));
    6767    }
    6868
     
    7373                          const size_t i) const
    7474    {
    75       return (*kf_)(vec, DataLookup1D(*data_,i),w,DataLookup1D(*weights_,i));
     75      return (*kf_)(vec, DataLookup1D(*data_,i, false),
     76                    w,DataLookup1D(*weights_,i, false));
    7677    }
    7778
  • trunk/lib/classifier/Kernel_MEV.h

    r555 r565  
    5858    ///
    5959    inline double element(const DataLookup1D& vec, const size_t i) const
    60     { return kf_->operator()(vec, DataLookup1D(*data_,i)); }
     60    { return kf_->operator()(vec, DataLookup1D(*data_,i,false)); }
    6161     
    6262    inline double element(const DataLookup1D& vec, const DataLookup1D& w,
    6363                          const size_t i) const
    64     {return (*kf_)(vec, DataLookup1D(*data_,i), w, DataLookup1D(w.size(),1.0));}
     64    {return (*kf_)(vec, DataLookup1D(*data_,i,false),
     65                   w, DataLookup1D(w.size(),1.0));}
    6566
    6667    const Kernel_MEV* selected(const std::vector<size_t>& index) const;
  • trunk/lib/classifier/Kernel_SEV.cc

    r548 r565  
    4040  double Kernel_SEV::element(const DataLookup1D& vec, const size_t i) const
    4141  {
    42     return kf_->operator()(vec, DataLookup1D(*data_,i));
     42    return kf_->operator()(vec, DataLookup1D(*data_,i, false));
    4343  }
    4444
     
    4646                             const size_t i) const
    4747  {
    48     return (*kf_)(vec, DataLookup1D(*data_,i), w, DataLookup1D(w.size(),1.0));
     48    return (*kf_)(vec, DataLookup1D(*data_,i, false),
     49                  w, DataLookup1D(w.size(),1.0));
    4950  }
    5051
  • trunk/lib/classifier/MatrixLookup.h

    r560 r565  
    6262    MatrixLookup(const gslapi::matrix& matrix,
    6363                 const std::vector<size_t>& index,
    64                  const bool row_vectors=true);
     64                 const bool row_vectors);
    6565
    6666    ///
     
    9494    ///
    9595    MatrixLookup(const MatrixLookup& matrix, const std::vector<size_t>&,
    96                  const bool row_vectors=true);
     96                 const bool row_vectors);
    9797
    9898    ///
  • trunk/lib/classifier/SVM.cc

    r559 r565  
    8282      index.push_back(ranker_->id(i));
    8383    kernel_ = kernel.selected(index);
     84    assert(kernel_->rows()==kernel.rows());
     85    assert(kernel_->columns()==kernel.columns());
    8486    owner_ = true;
    85 
     87   
    8688  }
    8789
  • trunk/test/data_lookup_1d_test.cc

    r537 r565  
    4141  *error << "DataLookup1D::DataLookup1D(const MatrixLookup&\n"
    4242         << "                           const size_t, const bool)...";
    43   classifier::DataLookup1D v1(m1,1);
     43  classifier::DataLookup1D v1(m1,1, true);
    4444  if (v1.size()!=m1.columns() || v1(0)!=m1(1,0) ||
    4545      v1(1)!=m1(1,1) ) {
Note: See TracChangeset for help on using the changeset viewer.