# Ticket #459: 459-1-7bf489cf624e.patch

File 459-1-7bf489cf624e.patch, 10.5 KB (added by Peter Kovacs, 7 years ago)
• ## doc/groups.dox

# HG changeset patch
# User Peter Kovacs <kpeter@inf.elte.hu>
# Date 1363436075 -3600
# Node ID 7bf489cf624efd8023bb1a9ba91302a12415fea0
# Parent  dbaf21739390aee540985c2ce919f3025bff545e
Minor fixes and improvements in the doc (#459)

diff --git a/doc/groups.dox b/doc/groups.dox
 a This group contains the algorithms for finding minimum cost flows and circulations \ref amo93networkflows. For more information about this problem and its dual solution, see \ref min_cost_flow problem and its dual solution, see: \ref min_cost_flow "Minimum Cost Flow Problem". LEMON contains several algorithms for this problem. most efficient one, though the best known theoretical bound on its running time is exponential. Both \ref KarpMmc "Karp" and \ref HartmannOrlinMmc "Hartmann-Orlin" algorithms run in time O(ne) and use space O(n2+e), but the latter one is typically faster due to the applied early termination scheme. run in time O(ne) and use space O(n2+e). */ /**
• ## lemon/capacity_scaling.h

diff --git a/lemon/capacity_scaling.h b/lemon/capacity_scaling.h
 a /// of the successive shortest path algorithm for finding a /// \ref min_cost_flow "minimum cost flow" \ref amo93networkflows, /// \ref edmondskarp72theoretical. It is an efficient dual /// solution method. /// solution method, which runs in polynomial time /// \f$O(e\log U (n+e)\log n)\f$, where U denotes the maximum /// of node supply and arc capacity values. /// /// This algorithm is typically slower than \ref CostScaling and /// \ref NetworkSimplex, but in special cases, it can be more
• ## lemon/concepts/bpgraph.h

diff --git a/lemon/concepts/bpgraph.h b/lemon/concepts/bpgraph.h
 a /// \brief The base node of the iterator. /// /// Returns the base node of the given incomming arc iterator /// Returns the base node of the given incoming arc iterator /// (i.e. the target node of the corresponding arc). Node baseNode(InArcIt) const { return INVALID; } /// \brief The running node of the iterator. /// /// Returns the running node of the given incomming arc iterator /// Returns the running node of the given incoming arc iterator /// (i.e. the source node of the corresponding arc). Node runningNode(InArcIt) const { return INVALID; }
• ## lemon/concepts/digraph.h

diff --git a/lemon/concepts/digraph.h b/lemon/concepts/digraph.h
 a /// \brief The base node of the iterator. /// /// Returns the base node of the given incomming arc iterator /// Returns the base node of the given incoming arc iterator /// (i.e. the target node of the corresponding arc). Node baseNode(InArcIt) const { return INVALID; } /// \brief The running node of the iterator. /// /// Returns the running node of the given incomming arc iterator /// Returns the running node of the given incoming arc iterator /// (i.e. the source node of the corresponding arc). Node runningNode(InArcIt) const { return INVALID; }
• ## lemon/concepts/graph.h

diff --git a/lemon/concepts/graph.h b/lemon/concepts/graph.h
 a /// \brief The base node of the iterator. /// /// Returns the base node of the given incomming arc iterator /// Returns the base node of the given incoming arc iterator /// (i.e. the target node of the corresponding arc). Node baseNode(InArcIt) const { return INVALID; } /// \brief The running node of the iterator. /// /// Returns the running node of the given incomming arc iterator /// Returns the running node of the given incoming arc iterator /// (i.e. the source node of the corresponding arc). Node runningNode(InArcIt) const { return INVALID; }
• ## lemon/concepts/graph_components.h

diff --git a/lemon/concepts/graph_components.h b/lemon/concepts/graph_components.h
 a /// This function gives back the next arc in the iteration order. void next(Arc&) const {} /// \brief Return the first arc incomming to the given node. /// \brief Return the first arc incoming to the given node. /// /// This function gives back the first arc incomming to the /// This function gives back the first arc incoming to the /// given node. void firstIn(Arc&, const Node&) const {} /// \brief Return the next arc incomming to the given node. /// \brief Return the next arc incoming to the given node. /// /// This function gives back the next arc incomming to the /// This function gives back the next arc incoming to the /// given node. void nextIn(Arc&) const {}
• ## lemon/cost_scaling.h

diff --git a/lemon/cost_scaling.h b/lemon/cost_scaling.h
 a /// It is a highly efficient primal-dual solution method, which /// can be viewed as the generalization of the \ref Preflow /// "preflow push-relabel" algorithm for the maximum flow problem. /// It is a polynomial algorithm, its running time complexity is /// \f$O(n^2e\log(nK))\f$, where K denotes the maximum arc cost. /// /// In general, \ref NetworkSimplex and \ref CostScaling are the fastest /// implementations available in LEMON for solving this problem. int u = _buckets[r]; _buckets[r] = _bucket_next[u]; // Search the incomming arcs of u // Search the incoming arcs of u LargeCost pi_u = _pi[u]; int last_out = _first_out[u+1]; for (int a = _first_out[u]; a != last_out; ++a) {
• ## lemon/cycle_canceling.h

diff --git a/lemon/cycle_canceling.h b/lemon/cycle_canceling.h
 a /// \ref goldberg89cyclecanceling. /// The most efficent one is the \ref CANCEL_AND_TIGHTEN /// "Cancel-and-Tighten" algorithm, thus it is the default method. /// It runs in strongly polynomial time, but in practice, it is typically /// orders of magnitude slower than the scaling algorithms and /// \ref NetworkSimplex. /// It runs in strongly polynomial time O(n2e2log(n)), /// but in practice, it is typically orders of magnitude slower than /// the scaling algorithms and \ref NetworkSimplex. /// (For more information, see \ref min_cost_flow_algs "the module page".) /// /// Most of the parameters of the problem (except for the digraph)
• ## lemon/hartmann_orlin_mmc.h

diff --git a/lemon/hartmann_orlin_mmc.h b/lemon/hartmann_orlin_mmc.h
 a /// This class implements the Hartmann-Orlin algorithm for finding /// a directed cycle of minimum mean cost in a digraph /// \ref hartmann93finding, \ref dasdan98minmeancycle. /// It is an improved version of \ref KarpMmc "Karp"'s original algorithm, /// it applies an efficient early termination scheme. /// It runs in time O(ne) and uses space O(n2+e). /// This method is based on \ref KarpMmc "Karp"'s original algorithm, but /// applies an early termination scheme. It makes the algorithm /// significantly faster for some problem instances, but slower for others. /// The algorithm runs in time O(ne) and uses space O(n2+e). /// /// \tparam GR The type of the digraph the algorithm runs on. /// \tparam CM The type of the cost map. The default /// found cycle. /// /// If you don't call this function before calling \ref run() or /// \ref findCycleMean(), it will allocate a local \ref Path "path" /// structure. The destuctor deallocates this automatically /// \ref findCycleMean(), a local \ref Path "path" structure /// will be allocated. The destuctor deallocates this automatically /// allocated object, of course. /// /// \note The algorithm calls only the \ref lemon::Path::addFront()
• ## lemon/howard_mmc.h

diff --git a/lemon/howard_mmc.h b/lemon/howard_mmc.h
 a /// found cycle. /// /// If you don't call this function before calling \ref run() or /// \ref findCycleMean(), it will allocate a local \ref Path "path" /// structure. The destuctor deallocates this automatically /// \ref findCycleMean(), a local \ref Path "path" structure /// will be allocated. The destuctor deallocates this automatically /// allocated object, of course. /// /// \note The algorithm calls only the \ref lemon::Path::addBack()
• ## lemon/karp_mmc.h

diff --git a/lemon/karp_mmc.h b/lemon/karp_mmc.h
 a /// found cycle. /// /// If you don't call this function before calling \ref run() or /// \ref findCycleMean(), it will allocate a local \ref Path "path" /// structure. The destuctor deallocates this automatically /// \ref findCycleMean(), a local \ref Path "path" structure /// will be allocated. The destuctor deallocates this automatically /// allocated object, of course. /// /// \note The algorithm calls only the \ref lemon::Path::addFront()
• ## lemon/list_graph.h

diff --git a/lemon/list_graph.h b/lemon/list_graph.h
 a ///\note The moved arcs are joined to node \c u using changeSource() ///or changeTarget(), thus \c ArcIt and \c OutArcIt iterators are ///invalidated for the outgoing arcs of node \c v and \c InArcIt ///iterators are invalidated for the incomming arcs of \c v. ///iterators are invalidated for the incoming arcs of \c v. ///Moreover all iterators referencing node \c v or the removed ///loops are also invalidated. Other iterators remain valid. ///
• ## lemon/network_simplex.h

diff --git a/lemon/network_simplex.h b/lemon/network_simplex.h
 a } } } else { // Find the min. cost incomming arc for each demand node // Find the min. cost incoming arc for each demand node for (int i = 0; i != int(demand_nodes.size()); ++i) { Node v = demand_nodes[i]; Cost c, min_cost = std::numeric_limits::max();