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/WeNNI.cc

    r1121 r1271  
    3838
    3939  WeNNI::WeNNI(const utility::Matrix& matrix,const utility::Matrix& flag,
    40                const u_int neighbours)
     40               const unsigned int neighbours)
    4141    : NNI(matrix,flag,neighbours), imputed_data_raw_(matrix)
    4242  {
     
    5050  // where N is defined in the paper cited in the NNI class definition
    5151  // documentation.
    52   u_int WeNNI::estimate(void)
     52  unsigned int WeNNI::estimate(void)
    5353  {
    54     for (unsigned int i=0; i<data_.rows(); i++) {
    55       std::vector<std::pair<u_int,double> > distance(calculate_distances(i));
     54    for (size_t i=0; i<data_.rows(); i++) {
     55      std::vector<std::pair<size_t,double> > distance(calculate_distances(i));
    5656      std::sort(distance.begin(),distance.end(),
    57                 pair_value_compare<u_int,double>());
     57                pair_value_compare<size_t,double>());
    5858      bool row_imputed=true;
    59       for (unsigned int j=0; j<data_.columns(); j++) {
    60         std::vector<u_int> knn=nearest_neighbours(j,distance);
     59      for (size_t j=0; j<data_.columns(); j++) {
     60        std::vector<size_t> knn=nearest_neighbours(j,distance);
    6161        double new_value=0.0;
    6262        double norm=0.0;
    63         for (std::vector<u_int>::const_iterator k=knn.begin(); k!=knn.end();
     63        for (std::vector<size_t>::const_iterator k=knn.begin(); k!=knn.end();
    6464             ++k) {
    6565          // Avoid division with zero (perfect match vectors)
Note: See TracChangeset for help on using the changeset viewer.