Changeset 2385:096d83158d41 in lemon0.x for lemon/min_cost_arborescence.h
 Timestamp:
 03/02/07 18:56:22 (12 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@3216
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/min_cost_arborescence.h
r2263 r2385 399 399 Value dualValue() const { 400 400 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) { 402 402 sum += _dual_variables[i].value; 403 403 } … … 460 460 461 461 bool operator==(const DualIt& it) const { 462 return (Node)(*this) == (Node)it;462 return static_cast<Node>(*this) == static_cast<Node>(it); 463 463 } 464 464 bool operator!=(const DualIt& it) const { 465 return (Node)(*this) != (Node)it;465 return static_cast<Node>(*this) != static_cast<Node>(it); 466 466 } 467 467 bool operator<(const DualIt& it) const { 468 return (Node)(*this) < (Node)it;468 return static_cast<Node>(*this) < static_cast<Node>(it); 469 469 } 470 470 … … 499 499 _node_order>set(it, 3); 500 500 _heap_cross_ref>set(it, Heap::PRE_HEAP); 501 _pred>set(it, INVALID); 501 502 } 502 503 for (EdgeIt it(*graph); it != INVALID; ++it) { … … 683 684 } 684 685 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) { 686 687 if ((*_cost_edges)[nodes[i]].value < minimum.value) { 687 688 minimum = (*_cost_edges)[nodes[i]]; … … 692 693 _dual_node_list.size(), minimum.value); 693 694 _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) { 695 696 (*_cost_edges)[nodes[i]].value = minimum.value; 696 697 level.edges.push_back((*_cost_edges)[nodes[i]]); … … 706 707 while (!level_stack.empty() && 707 708 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) { 709 710 Edge edge = level_stack.back().edges[i].edge; 710 711 Node source = graph>source(edge); … … 725 726 } 726 727 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) { 728 729 if ((*_cost_edges)[nodes[i]].value < minimum.value) { 729 730 minimum = (*_cost_edges)[nodes[i]]; … … 735 736 StackLevel level; 736 737 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) { 738 739 (*_cost_edges)[nodes[i]].value = minimum.value; 739 740 level.edges.push_back((*_cost_edges)[nodes[i]]);
Note: See TracChangeset
for help on using the changeset viewer.