COIN-OR::LEMON - Graph Library

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


Ignore:
Timestamp:
03/02/07 19:04:28 (17 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/arborescence_test.cc

    r2242 r2386  
    2020using namespace std;
    2121
    22 const int n = 10;
    23 const int e = 22;
     22const int NODES = 10;
     23const int EDGES = 22;
    2424
    2525int sourceNode = 0;
    2626
    27 int sources[e] = {
     27int sources[EDGES] = {
    2828  1, 0, 2, 4, 4, 3, 9, 8, 9, 8,
    2929  4, 2, 0, 6, 4, 1, 7, 2, 8, 6,
     
    3131};
    3232
    33 int targets[e] = {
     33int targets[EDGES] = {
    3434  8, 3, 1, 1, 4, 9, 8, 1, 8, 0,
    3535  3, 2, 1, 3, 1, 1, 2, 6, 3, 9,
     
    3737};
    3838
    39 double costs[e] = {
     39double costs[EDGES] = {
    4040  107.444, 70.3069, 46.0496, 28.3962, 91.4325,
    4141  76.9443, 61.986, 39.3754, 74.9575, 39.3153,
     
    5757  vector<Node> nodes;
    5858 
    59   for (int i = 0; i < n; ++i) {
     59  for (int i = 0; i < NODES; ++i) {
    6060    nodes.push_back(graph.addNode());
    6161  }
    6262
    63   for (int i = 0; i < e; ++i) {
     63  for (int i = 0; i < EDGES; ++i) {
    6464    Edge edge = graph.addEdge(nodes[sources[i]], nodes[targets[i]]);
    6565    cost[edge] = costs[i];
     
    8686    if (mca.reached(graph.source(it))) {
    8787      double sum = 0.0;
    88       for (int i = 0; i < (int)dualSolution.size(); ++i) {
     88      for (int i = 0; i < int(dualSolution.size()); ++i) {
    8989        if (dualSolution[i].second.find(graph.target(it))
    9090            != dualSolution[i].second.end() &&
Note: See TracChangeset for help on using the changeset viewer.