Ignore:
Timestamp:
Feb 2, 2008, 10:29:29 PM (14 years ago)
Author:
Peter
Message:

going back to previous design in which view and const_view are in different classes. Having them in same didnt work as expected. There is a problem converting vector::iterator to vector::const_iterator. I'll open a separate ticket for this issue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/classifier/KNN.h

    r1009 r1027  
    261261    for(size_t sample=0;sample<distances->columns();sample++) {
    262262      std::vector<size_t> k_index;
    263       utility::sort_smallest_index(k_index,k_,distances->column_vec(sample));
     263      utility::sort_smallest_index(k_index,k_,
     264                                   distances->column_const_vec(sample));
    264265      for(size_t j=0;j<k_index.size();j++) {
    265266        prediction(target_(k_index[j]),sample)++;
Note: See TracChangeset for help on using the changeset viewer.