Changeset 1261


Ignore:
Timestamp:
Apr 8, 2008, 4:01:33 PM (13 years ago)
Author:
Peter
Message:

changing some u_int to size_t

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/kernel_test.cc

    r1251 r1261  
    3737#include <cassert>
    3838#include <cmath>
     39#include <cstddef>
    3940#include <cstdlib>
    4041#include <fstream>
     
    139140  suite.err() << "testing Kernel_MEV" << std::endl;
    140141  classifier::Kernel_MEV kernel(data,*kf);
    141   for(u_int i=0;i<control.rows();i++)
    142     for(u_int j=0;j<control.columns();j++)
     142  for(size_t i=0;i<control.rows();i++)
     143    for(size_t j=0;j<control.columns();j++)
    143144      if (std::abs(kernel(i,j)-control(i,j))>error_bound){
    144145        suite.err() << "ERROR: comparing kernel(" << i << "," << j << "): "
     
    183184  suite.err() << "testing Kernel_SEV" << std::endl;
    184185  classifier::Kernel_SEV kernel(data,*kf);
    185   for(u_int i=0;i<control.rows();i++)
    186     for(u_int j=0;j<control.columns();j++)
     186  for(size_t i=0;i<control.rows();i++)
     187    for(size_t j=0;j<control.columns();j++)
    187188      if (std::abs(kernel(i,j)-control(i,j))>error_bound){
    188189        suite.err() << "ERROR: comparing kernel(" << i << "," << j << "): "
  • trunk/test/vector_test.cc

    r1260 r1261  
    3434#include "yat/utility/VectorView.h"
    3535
     36#include <cstddef>
    3637#include <fstream>
    3738#include <sstream>
    38 
    39 #include <sys/types.h>
    4039
    4140using namespace theplu::yat;
     
    178177      this_ok=false;
    179178    else
    180       for (u_int i=0; i<vec_view2.size(); ++i)
     179      for (size_t i=0; i<vec_view2.size(); ++i)
    181180        if ((*vec_view)(i)!=vec_view2(i))
    182181          this_ok=false;
  • trunk/yat/statistics/VectorFunction.cc

    r1000 r1261  
    6565 
    6666
    67   Nth_Element::Nth_Element(u_int N)
     67  Nth_Element::Nth_Element(size_t N)
    6868    : N_(N) {}
    6969
  • trunk/yat/statistics/VectorFunction.h

    r1260 r1261  
    2727
    2828#include <vector>
    29 
    30 #include <sys/types.h>
    3129
    3230namespace theplu {
     
    109107    /// efficient)
    110108    ///
    111     Nth_Element(u_int N);
     109    Nth_Element(size_t N);
    112110
    113111    ///
     
    117115
    118116  private:
    119     u_int N_;
     117    size_t N_;
    120118  };
    121119
  • trunk/yat/utility/FileUtil.cc

    r1260 r1261  
    2828
    2929#include <cerrno>
     30#include <cstddef>
    3031#include <iostream>
    3132#include <stdexcept>
     
    3334
    3435#include <sys/stat.h>
    35 #include <sys/types.h>
    3636#include <unistd.h>
    3737
     
    5858    int mode=0;
    5959    bool ok = true;
    60     for (u_int i=0; i<bits.length(); i++)
     60    for (size_t i=0; i<bits.length(); i++)
    6161      switch (bits[i]) {
    6262          case 'r':
Note: See TracChangeset for help on using the changeset viewer.