Ignore:
Timestamp:
Apr 9, 2008, 6:11:07 PM (13 years ago)
Author:
Peter
Message:

replaced u_int with unsigned int or size_t

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/kNNI.cc

    r1121 r1271  
    3737
    3838  kNNI::kNNI(const utility::Matrix& matrix,const utility::Matrix& flag,
    39              const u_int neighbours)
     39             const unsigned int neighbours)
    4040    : NNI(matrix,flag,neighbours)
    4141  {
     
    5555  // where N is defined in the paper cited in the NNI class definition
    5656  // documentation.
    57   u_int kNNI::estimate(void)
     57  unsigned int kNNI::estimate(void)
    5858  {
    59     for (unsigned int i=0; i<mv_rows_.size(); i++) {
    60       std::vector<std::pair<u_int,double> >
     59    for (size_t i=0; i<mv_rows_.size(); i++) {
     60      std::vector<std::pair<size_t,double> >
    6161        distance(calculate_distances(mv_rows_[i]));
    6262      std::sort(distance.begin(),distance.end(),
    63                 pair_value_compare<u_int,double>());
    64       for (unsigned int j=0; j<data_.columns(); j++)
     63                pair_value_compare<size_t,double>());
     64      for (size_t j=0; j<data_.columns(); j++)
    6565        if (!weight_(mv_rows_[i],j)) {
    66           std::vector<u_int> knn=nearest_neighbours(j,distance);
     66          std::vector<size_t> knn=nearest_neighbours(j,distance);
    6767          double new_value=0.0;
    6868          double norm=0.0;
    69           for (std::vector<u_int>::const_iterator k=knn.begin(); k!=knn.end();
     69          for (std::vector<size_t>::const_iterator k=knn.begin(); k!=knn.end();
    7070               ++k) {
    7171            // Avoid division with zero (perfect match vectors)
Note: See TracChangeset for help on using the changeset viewer.