Changeset 1081:f1398882a928 in lemon for lemon/network_simplex.h
- Timestamp:
- 08/08/11 12:36:16 (12 years ago)
- Branch:
- 1.1
- Phase:
- public
- Tags:
- r1.1.4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/network_simplex.h
r976 r1081 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 96 96 UNBOUNDED 97 97 }; 98 98 99 99 /// \brief Constants for selecting the type of the supply constraints. 100 100 /// … … 114 114 LEQ 115 115 }; 116 116 117 117 /// \brief Constants for selecting the pivot rule. 118 118 /// … … 157 157 ALTERING_LIST 158 158 }; 159 159 160 160 private: 161 161 … … 224 224 225 225 public: 226 226 227 227 /// \brief Constant for infinite upper bounds (capacities). 228 228 /// … … 645 645 LEMON_ASSERT(std::numeric_limits<Cost>::is_signed, 646 646 "The cost type of NetworkSimplex must be signed"); 647 647 648 648 // Resize vectors 649 649 _node_num = countNodes(_graph); … … 685 685 if ((i += k) >= _arc_num) i = (i % k) + 1; 686 686 } 687 687 688 688 // Initialize maps 689 689 for (int i = 0; i != _node_num; ++i) { … … 810 810 return *this; 811 811 } 812 812 813 813 /// \brief Set the type of the supply constraints. 814 814 /// … … 836 836 /// This function runs the algorithm. 837 837 /// The paramters can be specified using functions \ref lowerMap(), 838 /// \ref upperMap(), \ref costMap(), \ref supplyMap(), \ref stSupply(), 838 /// \ref upperMap(), \ref costMap(), \ref supplyMap(), \ref stSupply(), 839 839 /// \ref supplyType(). 840 840 /// For example, … … 1055 1055 _state[i] = STATE_LOWER; 1056 1056 } 1057 1057 1058 1058 // Set data for the artificial root node 1059 1059 _root = _node_num; … … 1229 1229 for (int u = second; u != join; u = _parent[u]) { 1230 1230 e = _pred[u]; 1231 d = _forward[u] ? 1231 d = _forward[u] ? 1232 1232 (_cap[e] == INF ? INF : _cap[e] - _flow[e]) : _flow[e]; 1233 1233 if (d <= delta) { … … 1436 1436 } 1437 1437 } 1438 1438 1439 1439 // Check feasibility 1440 1440 for (int e = _search_arc_num; e != _all_arc_num; ++e) { … … 1453 1453 } 1454 1454 } 1455 1455 1456 1456 // Shift potentials to meet the requirements of the GEQ/LEQ type 1457 1457 // optimality conditions
Note: See TracChangeset
for help on using the changeset viewer.