COIN-OR::LEMON - Graph Library

Changeset 2386:81b47fc5c444 in lemon-0.x for test/radix_sort_test.cc


Ignore:
Timestamp:
03/02/07 19:04:28 (15 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3217
Message:

Hard Warning checking

  • based on the remark of the ZIB user
  • we do not use -Winline
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/radix_sort_test.cc

    r2242 r2386  
    3333using namespace lemon;
    3434
     35typedef unsigned char uchar;
     36
    3537void checkRadixSort() {
    3638  {
     
    4951    vector<unsigned char> data1(n), data2(n);
    5052    for (int i = 0; i < n; ++i) {
    51       data1[i] = data2[i] = rnd[(unsigned char)200];
     53      data1[i] = data2[i] = rnd[uchar(200)];
    5254    }
    5355    radixSort(data1.begin(), data1.end());
     
    7678    vector<unsigned char> data1(n), data2(n);
    7779    for (int i = 0; i < n; ++i) {
    78       data1[i] = data2[i] = rnd[(unsigned char)200];
     80      data1[i] = data2[i] = rnd[uchar(200)];
    7981    }
    8082    counterSort(data1.begin(), data1.end());
     
    9799
    98100  const int n = 100;
    99   const int e = (int)(n * log((double)n));
     101  const int e = int(n * log(double(n)));
    100102
    101103  Graph graph;
     
    118120  Graph::EdgeMap<bool> was(graph, false);
    119121
    120   for (int i = 0; i < (int)edges.size(); ++i) {
     122  for (int i = 0; i < int(edges.size()); ++i) {
    121123    check(!was[edges[i]], "Test failed");
    122124    was[edges[i]] = true;
    123125  }
    124126
    125   for (int i = 1; i < (int)edges.size(); ++i) {
     127  for (int i = 1; i < int(edges.size()); ++i) {
    126128    check(graph.id(graph.source(edges[i - 1])) <=
    127129          graph.id(graph.source(edges[i])), "Test failed");
     
    136138
    137139  const int n = 100;
    138   const int e = (int)(n * log((double)n));
     140  const int e = int(n * log(double(n)));
    139141
    140142  Graph graph;
     
    161163  Graph::EdgeMap<bool> was(graph, false);
    162164
    163   for (int i = 0; i < (int)edges.size(); ++i) {
     165  for (int i = 0; i < int(edges.size()); ++i) {
    164166    check(!was[edges[i]], "Test failed");
    165167    was[edges[i]] = true;
    166168  }
    167169
    168   for (int i = 1; i < (int)edges.size(); ++i) {
     170  for (int i = 1; i < int(edges.size()); ++i) {
    169171    check(graph.id(graph.target(edges[i - 1])) <
    170172          graph.id(graph.target(edges[i])) ||
Note: See TracChangeset for help on using the changeset viewer.