29 |
29 |
30 #include <lemon/graph_adaptor.h> |
30 #include <lemon/graph_adaptor.h> |
31 #include <lemon/graph_utils.h> |
31 #include <lemon/graph_utils.h> |
32 #include <lemon/smart_graph.h> |
32 #include <lemon/smart_graph.h> |
33 #include <lemon/math.h> |
33 #include <lemon/math.h> |
34 |
|
35 #define _DEBUG_ |
|
36 |
34 |
37 namespace lemon { |
35 namespace lemon { |
38 |
36 |
39 /// \addtogroup min_cost_flow |
37 /// \addtogroup min_cost_flow |
40 /// @{ |
38 /// @{ |
607 _graph(), _graph_ref(graph), _lower(&lower), _capacity(_graph), |
605 _graph(), _graph_ref(graph), _lower(&lower), _capacity(_graph), |
608 _cost(_graph), _supply(_graph), _flow(_graph), |
606 _cost(_graph), _supply(_graph), _flow(_graph), |
609 _potential(_graph), _depth(_graph), _parent(_graph), |
607 _potential(_graph), _depth(_graph), _parent(_graph), |
610 _pred_edge(_graph), _thread(_graph), _forward(_graph), |
608 _pred_edge(_graph), _thread(_graph), _forward(_graph), |
611 _state(_graph), _red_cost(_graph, _cost, _potential), |
609 _state(_graph), _red_cost(_graph, _cost, _potential), |
612 _flow_result(0), _potential_result(0), |
610 _flow_result(NULL), _potential_result(NULL), |
613 _local_flow(false), _local_potential(false), |
611 _local_flow(false), _local_potential(false), |
614 _node_ref(graph), _edge_ref(graph) |
612 _node_ref(graph), _edge_ref(graph) |
615 { |
613 { |
616 // Checking the sum of supply values |
614 // Checking the sum of supply values |
617 Supply sum = 0; |
615 Supply sum = 0; |
657 _graph(), _graph_ref(graph), _lower(NULL), _capacity(_graph), |
655 _graph(), _graph_ref(graph), _lower(NULL), _capacity(_graph), |
658 _cost(_graph), _supply(_graph), _flow(_graph), |
656 _cost(_graph), _supply(_graph), _flow(_graph), |
659 _potential(_graph), _depth(_graph), _parent(_graph), |
657 _potential(_graph), _depth(_graph), _parent(_graph), |
660 _pred_edge(_graph), _thread(_graph), _forward(_graph), |
658 _pred_edge(_graph), _thread(_graph), _forward(_graph), |
661 _state(_graph), _red_cost(_graph, _cost, _potential), |
659 _state(_graph), _red_cost(_graph, _cost, _potential), |
662 _flow_result(0), _potential_result(0), |
660 _flow_result(NULL), _potential_result(NULL), |
663 _local_flow(false), _local_potential(false), |
661 _local_flow(false), _local_potential(false), |
664 _node_ref(graph), _edge_ref(graph) |
662 _node_ref(graph), _edge_ref(graph) |
665 { |
663 { |
666 // Checking the sum of supply values |
664 // Checking the sum of supply values |
667 Supply sum = 0; |
665 Supply sum = 0; |
701 _graph(), _graph_ref(graph), _lower(&lower), _capacity(_graph), |
699 _graph(), _graph_ref(graph), _lower(&lower), _capacity(_graph), |
702 _cost(_graph), _supply(_graph), _flow(_graph), |
700 _cost(_graph), _supply(_graph), _flow(_graph), |
703 _potential(_graph), _depth(_graph), _parent(_graph), |
701 _potential(_graph), _depth(_graph), _parent(_graph), |
704 _pred_edge(_graph), _thread(_graph), _forward(_graph), |
702 _pred_edge(_graph), _thread(_graph), _forward(_graph), |
705 _state(_graph), _red_cost(_graph, _cost, _potential), |
703 _state(_graph), _red_cost(_graph, _cost, _potential), |
706 _flow_result(0), _potential_result(0), |
704 _flow_result(NULL), _potential_result(NULL), |
707 _local_flow(false), _local_potential(false), |
705 _local_flow(false), _local_potential(false), |
708 _node_ref(graph), _edge_ref(graph) |
706 _node_ref(graph), _edge_ref(graph) |
709 { |
707 { |
710 // Copying _graph_ref to graph |
708 // Copying _graph_ref to graph |
711 copyGraph(_graph, _graph_ref) |
709 copyGraph(_graph, _graph_ref) |
751 _graph(), _graph_ref(graph), _lower(NULL), _capacity(_graph), |
749 _graph(), _graph_ref(graph), _lower(NULL), _capacity(_graph), |
752 _cost(_graph), _supply(_graph, 0), _flow(_graph), |
750 _cost(_graph), _supply(_graph, 0), _flow(_graph), |
753 _potential(_graph), _depth(_graph), _parent(_graph), |
751 _potential(_graph), _depth(_graph), _parent(_graph), |
754 _pred_edge(_graph), _thread(_graph), _forward(_graph), |
752 _pred_edge(_graph), _thread(_graph), _forward(_graph), |
755 _state(_graph), _red_cost(_graph, _cost, _potential), |
753 _state(_graph), _red_cost(_graph, _cost, _potential), |
756 _flow_result(0), _potential_result(0), |
754 _flow_result(NULL), _potential_result(NULL), |
757 _local_flow(false), _local_potential(false), |
755 _local_flow(false), _local_potential(false), |
758 _node_ref(graph), _edge_ref(graph) |
756 _node_ref(graph), _edge_ref(graph) |
759 { |
757 { |
760 // Copying _graph_ref to graph |
758 // Copying _graph_ref to graph |
761 copyGraph(_graph, _graph_ref) |
759 copyGraph(_graph, _graph_ref) |