# HG changeset patch
# User Peter Kovacs <kpeter@inf.elte.hu>
# Date 1375760329 -7200
# Node ID c5cd8960df7431aceee364cceeedeafccafe3360
# Parent 218171dc022d194408f71d4dd290c5b0fb21dd44
Use m instead of e for denoting the number of arcs/edges (#463)
diff --git a/doc/groups.dox b/doc/groups.dox
a
|
b
|
|
497 | 497 | most efficient one, though the best known theoretical bound on its running |
498 | 498 | time is exponential. |
499 | 499 | Both \ref KarpMmc "Karp" and \ref HartmannOrlinMmc "Hartmann-Orlin" algorithms |
500 | | run in time O(ne) and use space O(n<sup>2</sup>+e). |
| 500 | run in time O(nm) and use space O(n<sup>2</sup>+m). |
501 | 501 | */ |
502 | 502 | |
503 | 503 | /** |
diff --git a/lemon/bellman_ford.h b/lemon/bellman_ford.h
a
|
b
|
|
149 | 149 | /// \ingroup shortest_path |
150 | 150 | /// This class provides an efficient implementation of the Bellman-Ford |
151 | 151 | /// algorithm. The maximum time complexity of the algorithm is |
152 | | /// <tt>O(ne)</tt>. |
| 152 | /// <tt>O(nm)</tt>. |
153 | 153 | /// |
154 | 154 | /// The Bellman-Ford algorithm solves the single-source shortest path |
155 | 155 | /// problem when the arcs can have negative lengths, but the digraph |
diff --git a/lemon/capacity_scaling.h b/lemon/capacity_scaling.h
a
|
b
|
|
69 | 69 | /// \ref min_cost_flow "minimum cost flow" \cite amo93networkflows, |
70 | 70 | /// \cite edmondskarp72theoretical. It is an efficient dual |
71 | 71 | /// solution method, which runs in polynomial time |
72 | | /// \f$O(e\log U (n+e)\log n)\f$, where <i>U</i> denotes the maximum |
| 72 | /// \f$O(m\log U (n+m)\log n)\f$, where <i>U</i> denotes the maximum |
73 | 73 | /// of node supply and arc capacity values. |
74 | 74 | /// |
75 | 75 | /// This algorithm is typically slower than \ref CostScaling and |
… |
… |
|
646 | 646 | /// \brief Return the total cost of the found flow. |
647 | 647 | /// |
648 | 648 | /// This function returns the total cost of the found flow. |
649 | | /// Its complexity is O(e). |
| 649 | /// Its complexity is O(m). |
650 | 650 | /// |
651 | 651 | /// \note The return type of the function can be specified as a |
652 | 652 | /// template parameter. For example, |
diff --git a/lemon/cost_scaling.h b/lemon/cost_scaling.h
a
|
b
|
|
97 | 97 | /// can be viewed as the generalization of the \ref Preflow |
98 | 98 | /// "preflow push-relabel" algorithm for the maximum flow problem. |
99 | 99 | /// It is a polynomial algorithm, its running time complexity is |
100 | | /// \f$O(n^2e\log(nK))\f$, where <i>K</i> denotes the maximum arc cost. |
| 100 | /// \f$O(n^2m\log(nK))\f$, where <i>K</i> denotes the maximum arc cost. |
101 | 101 | /// |
102 | 102 | /// In general, \ref NetworkSimplex and \ref CostScaling are the fastest |
103 | 103 | /// implementations available in LEMON for solving this problem. |
… |
… |
|
670 | 670 | /// \brief Return the total cost of the found flow. |
671 | 671 | /// |
672 | 672 | /// This function returns the total cost of the found flow. |
673 | | /// Its complexity is O(e). |
| 673 | /// Its complexity is O(m). |
674 | 674 | /// |
675 | 675 | /// \note The return type of the function can be specified as a |
676 | 676 | /// template parameter. For example, |
diff --git a/lemon/cycle_canceling.h b/lemon/cycle_canceling.h
a
|
b
|
|
51 | 51 | /// \cite goldberg89cyclecanceling. |
52 | 52 | /// The most efficent one is the \ref CANCEL_AND_TIGHTEN |
53 | 53 | /// "Cancel-and-Tighten" algorithm, thus it is the default method. |
54 | | /// It runs in strongly polynomial time O(n<sup>2</sup>e<sup>2</sup>log(n)), |
| 54 | /// It runs in strongly polynomial time O(n<sup>2</sup>m<sup>2</sup>log(n)), |
55 | 55 | /// but in practice, it is typically orders of magnitude slower than |
56 | 56 | /// the scaling algorithms and \ref NetworkSimplex. |
57 | 57 | /// (For more information, see \ref min_cost_flow_algs "the module page".) |
… |
… |
|
133 | 133 | /// well-known strongly polynomial method |
134 | 134 | /// \cite goldberg89cyclecanceling. It improves along a |
135 | 135 | /// \ref min_mean_cycle "minimum mean cycle" in each iteration. |
136 | | /// Its running time complexity is O(n<sup>2</sup>e<sup>3</sup>log(n)). |
| 136 | /// Its running time complexity is O(n<sup>2</sup>m<sup>3</sup>log(n)). |
137 | 137 | MINIMUM_MEAN_CYCLE_CANCELING, |
138 | 138 | /// The "Cancel-and-Tighten" algorithm, which can be viewed as an |
139 | 139 | /// improved version of the previous method |
140 | 140 | /// \cite goldberg89cyclecanceling. |
141 | 141 | /// It is faster both in theory and in practice, its running time |
142 | | /// complexity is O(n<sup>2</sup>e<sup>2</sup>log(n)). |
| 142 | /// complexity is O(n<sup>2</sup>m<sup>2</sup>log(n)). |
143 | 143 | CANCEL_AND_TIGHTEN |
144 | 144 | }; |
145 | 145 | |
… |
… |
|
576 | 576 | /// \brief Return the total cost of the found flow. |
577 | 577 | /// |
578 | 578 | /// This function returns the total cost of the found flow. |
579 | | /// Its complexity is O(e). |
| 579 | /// Its complexity is O(m). |
580 | 580 | /// |
581 | 581 | /// \note The return type of the function can be specified as a |
582 | 582 | /// template parameter. For example, |
diff --git a/lemon/gomory_hu.h b/lemon/gomory_hu.h
a
|
b
|
|
46 | 46 | /// of nodes can easily be obtained. |
47 | 47 | /// |
48 | 48 | /// The algorithm calculates \e n-1 distinct minimum cuts (currently with |
49 | | /// the \ref Preflow algorithm), thus it has \f$O(n^3\sqrt{e})\f$ overall |
| 49 | /// the \ref Preflow algorithm), thus it has \f$O(n^3\sqrt{m})\f$ overall |
50 | 50 | /// time complexity. It calculates a rooted Gomory-Hu tree. |
51 | 51 | /// The structure of the tree and the edge weights can be |
52 | 52 | /// obtained using \c predNode(), \c predValue() and \c rootDist(). |
diff --git a/lemon/hartmann_orlin_mmc.h b/lemon/hartmann_orlin_mmc.h
a
|
b
|
|
102 | 102 | /// This method is based on \ref KarpMmc "Karp"'s original algorithm, but |
103 | 103 | /// applies an early termination scheme. It makes the algorithm |
104 | 104 | /// significantly faster for some problem instances, but slower for others. |
105 | | /// The algorithm runs in time O(ne) and uses space O(n<sup>2</sup>+e). |
| 105 | /// The algorithm runs in time O(nm) and uses space O(n<sup>2</sup>+m). |
106 | 106 | /// |
107 | 107 | /// \tparam GR The type of the digraph the algorithm runs on. |
108 | 108 | /// \tparam CM The type of the cost map. The default |
diff --git a/lemon/karp_mmc.h b/lemon/karp_mmc.h
a
|
b
|
|
99 | 99 | /// This class implements Karp's algorithm for finding a directed |
100 | 100 | /// cycle of minimum mean cost in a digraph |
101 | 101 | /// \cite karp78characterization, \cite dasdan98minmeancycle. |
102 | | /// It runs in time O(ne) and uses space O(n<sup>2</sup>+e). |
| 102 | /// It runs in time O(nm) and uses space O(n<sup>2</sup>+m). |
103 | 103 | /// |
104 | 104 | /// \tparam GR The type of the digraph the algorithm runs on. |
105 | 105 | /// \tparam CM The type of the cost map. The default |
diff --git a/lemon/min_cost_arborescence.h b/lemon/min_cost_arborescence.h
a
|
b
|
|
101 | 101 | /// more sources should be given to the algorithm and it will calculate |
102 | 102 | /// the minimum cost subgraph that is the union of arborescences with the |
103 | 103 | /// given sources and spans all the nodes which are reachable from the |
104 | | /// sources. The time complexity of the algorithm is O(n<sup>2</sup>+e). |
| 104 | /// sources. The time complexity of the algorithm is O(n<sup>2</sup>+m). |
105 | 105 | /// |
106 | 106 | /// The algorithm also provides an optimal dual solution, therefore |
107 | 107 | /// the optimality of the solution can be checked. |
diff --git a/lemon/network_simplex.h b/lemon/network_simplex.h
a
|
b
|
|
973 | 973 | /// \brief Return the total cost of the found flow. |
974 | 974 | /// |
975 | 975 | /// This function returns the total cost of the found flow. |
976 | | /// Its complexity is O(e). |
| 976 | /// Its complexity is O(m). |
977 | 977 | /// |
978 | 978 | /// \note The return type of the function can be specified as a |
979 | 979 | /// template parameter. For example, |
diff --git a/lemon/preflow.h b/lemon/preflow.h
a
|
b
|
|
107 | 107 | /// The preflow algorithms are the fastest known maximum |
108 | 108 | /// flow algorithms. The current implementation uses a mixture of the |
109 | 109 | /// \e "highest label" and the \e "bound decrease" heuristics. |
110 | | /// The worst case time complexity of the algorithm is \f$O(n^2\sqrt{e})\f$. |
| 110 | /// The worst case time complexity of the algorithm is \f$O(n^2\sqrt{m})\f$. |
111 | 111 | /// |
112 | 112 | /// The algorithm consists of two phases. After the first phase |
113 | 113 | /// the maximum flow value and the minimum cut is obtained. The |
diff --git a/lemon/suurballe.h b/lemon/suurballe.h
a
|
b
|
|
682 | 682 | /// |
683 | 683 | /// This function returns the total length of the found paths, i.e. |
684 | 684 | /// the total cost of the found flow. |
685 | | /// The complexity of the function is O(e). |
| 685 | /// The complexity of the function is O(m). |
686 | 686 | /// |
687 | 687 | /// \pre \ref run() or \ref findFlow() must be called before using |
688 | 688 | /// this function. |