COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
03/02/07 18:56:22 (12 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3216
Message:

Bug fix
Setting _pred in init()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/min_cost_arborescence.h

    r2263 r2385  
    399399    Value dualValue() const {
    400400      Value sum = 0;
    401       for (int i = 0; i < (int)_dual_variables.size(); ++i) {
     401      for (int i = 0; i < int(_dual_variables.size()); ++i) {
    402402        sum += _dual_variables[i].value;
    403403      }
     
    460460
    461461      bool operator==(const DualIt& it) const {
    462         return (Node)(*this) == (Node)it;
     462        return static_cast<Node>(*this) == static_cast<Node>(it);
    463463      }
    464464      bool operator!=(const DualIt& it) const {
    465         return (Node)(*this) != (Node)it;
     465        return static_cast<Node>(*this) != static_cast<Node>(it);
    466466      }
    467467      bool operator<(const DualIt& it) const {
    468         return (Node)(*this) < (Node)it;
     468        return static_cast<Node>(*this) < static_cast<Node>(it);
    469469      }
    470470     
     
    499499        _node_order->set(it, -3);
    500500        _heap_cross_ref->set(it, Heap::PRE_HEAP);
     501        _pred->set(it, INVALID);
    501502      }
    502503      for (EdgeIt it(*graph); it != INVALID; ++it) {
     
    683684      }
    684685      CostEdge minimum = (*_cost_edges)[nodes[0]];
    685       for (int i = 1; i < (int)nodes.size(); ++i) {
     686      for (int i = 1; i < int(nodes.size()); ++i) {
    686687        if ((*_cost_edges)[nodes[i]].value < minimum.value) {
    687688          minimum = (*_cost_edges)[nodes[i]];
     
    692693                       _dual_node_list.size(), minimum.value);
    693694      _dual_variables.push_back(var);
    694       for (int i = 0; i < (int)nodes.size(); ++i) {
     695      for (int i = 0; i < int(nodes.size()); ++i) {
    695696        (*_cost_edges)[nodes[i]].value -= minimum.value;
    696697        level.edges.push_back((*_cost_edges)[nodes[i]]);
     
    706707      while (!level_stack.empty() &&
    707708             level_stack.back().node_level >= node_bottom) {
    708         for (int i = 0; i < (int)level_stack.back().edges.size(); ++i) {
     709        for (int i = 0; i < int(level_stack.back().edges.size()); ++i) {
    709710          Edge edge = level_stack.back().edges[i].edge;
    710711          Node source = graph->source(edge);
     
    725726      }
    726727      CostEdge minimum = (*_cost_edges)[nodes[0]];
    727       for (int i = 1; i < (int)nodes.size(); ++i) {
     728      for (int i = 1; i < int(nodes.size()); ++i) {
    728729        if ((*_cost_edges)[nodes[i]].value < minimum.value) {
    729730          minimum = (*_cost_edges)[nodes[i]];
     
    735736      StackLevel level;
    736737      level.node_level = node_bottom;
    737       for (int i = 0; i < (int)nodes.size(); ++i) {
     738      for (int i = 0; i < int(nodes.size()); ++i) {
    738739        (*_cost_edges)[nodes[i]].value -= minimum.value;
    739740        level.edges.push_back((*_cost_edges)[nodes[i]]);
Note: See TracChangeset for help on using the changeset viewer.