Changeset 877:141f9c0db4a3 in lemon-main for lemon/network_simplex.h
- Timestamp:
- 03/06/10 15:35:12 (14 years ago)
- Branch:
- default
- Children:
- 879:38213abd2911, 931:f112c18bc304
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/network_simplex.h
r862 r877 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-2010 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 98 98 UNBOUNDED 99 99 }; 100 100 101 101 /// \brief Constants for selecting the type of the supply constraints. 102 102 /// … … 116 116 LEQ 117 117 }; 118 118 119 119 /// \brief Constants for selecting the pivot rule. 120 120 /// … … 159 159 ALTERING_LIST 160 160 }; 161 161 162 162 private: 163 163 … … 228 228 int stem, par_stem, new_stem; 229 229 Value delta; 230 230 231 231 const Value MAX; 232 232 233 233 public: 234 234 235 235 /// \brief Constant for infinite upper bounds (capacities). 236 236 /// … … 499 499 } 500 500 if (_curr_length == 0) return false; 501 502 search_end: 501 502 search_end: 503 503 _minor_count = 1; 504 504 _next_arc = e; … … 609 609 } 610 610 if (_curr_length == 0) return false; 611 611 612 612 search_end: 613 613 … … 635 635 /// \param graph The digraph the algorithm runs on. 636 636 /// \param arc_mixing Indicate if the arcs have to be stored in a 637 /// mixed order in the internal data structure. 637 /// mixed order in the internal data structure. 638 638 /// In special cases, it could lead to better overall performance, 639 639 /// but it is usually slower. Therefore it is disabled by default. … … 650 650 LEMON_ASSERT(std::numeric_limits<Cost>::is_signed, 651 651 "The cost type of NetworkSimplex must be signed"); 652 652 653 653 // Reset data structures 654 654 reset(); … … 764 764 return *this; 765 765 } 766 766 767 767 /// \brief Set the type of the supply constraints. 768 768 /// … … 790 790 /// This function runs the algorithm. 791 791 /// The paramters can be specified using functions \ref lowerMap(), 792 /// \ref upperMap(), \ref costMap(), \ref supplyMap(), \ref stSupply(), 792 /// \ref upperMap(), \ref costMap(), \ref supplyMap(), \ref stSupply(), 793 793 /// \ref supplyType(). 794 794 /// For example, … … 945 945 } 946 946 } 947 947 948 948 // Reset parameters 949 949 resetParams(); 950 950 return *this; 951 951 } 952 952 953 953 /// @} 954 954 … … 1090 1090 _state[i] = STATE_LOWER; 1091 1091 } 1092 1092 1093 1093 // Set data for the artificial root node 1094 1094 _root = _node_num; … … 1264 1264 for (int u = second; u != join; u = _parent[u]) { 1265 1265 e = _pred[u]; 1266 d = _forward[u] ? 1266 d = _forward[u] ? 1267 1267 (_cap[e] >= MAX ? INF : _cap[e] - _flow[e]) : _flow[e]; 1268 1268 if (d <= delta) { … … 1568 1568 } 1569 1569 } 1570 1570 1571 1571 // Check feasibility 1572 1572 for (int e = _search_arc_num; e != _all_arc_num; ++e) { … … 1585 1585 } 1586 1586 } 1587 1587 1588 1588 // Shift potentials to meet the requirements of the GEQ/LEQ type 1589 1589 // optimality conditions
Note: See TracChangeset
for help on using the changeset viewer.