# HG changeset patch # User alpar # Date 1095157787 0 # Node ID 209c9d53e195a33b6753f2add5f4ec88a31bd646 # Parent 54d3c1599d08e0f6b6e62f8b5e7f2a49ee5ba2bf Changes in doc. diff -r 54d3c1599d08 -r 209c9d53e195 src/hugo/minlengthpaths.h --- a/src/hugo/minlengthpaths.h Tue Sep 14 10:23:26 2004 +0000 +++ b/src/hugo/minlengthpaths.h Tue Sep 14 10:29:47 2004 +0000 @@ -66,7 +66,7 @@ ///Runs the algorithm. ///Returns k if there are at least k edge-disjoint paths from s to t. - ///Otherwise it returns the number of found edge-disjoint paths from s to t. + ///Otherwise it returns the number of found edge-disjoint paths from s to t. int run(Node s, Node t, int k) { int i = mincost_flow.run(s,t,k); @@ -111,34 +111,51 @@ } + ///Total length of the paths + ///This function gives back the total length of the found paths. - ///Assumes that \c run() has been run and nothing changed since then. + ///\pre \ref run() must + ///be called before using this function. Length totalLength(){ return mincost_flow.totalLength(); } - ///Returns a const reference to the EdgeMap \c flow. \pre \ref run() must + ///Return the found flow. + + ///This function returns a const reference to the EdgeMap \c flow. + ///\pre \ref run() must ///be called before using this function. const EdgeIntMap &getFlow() const { return mincost_flow.flow;} - ///Returns a const reference to the NodeMap \c potential (the dual solution). + /// Return the optimal dual solution + + ///This function returns a const reference to the NodeMap + ///\c potential (the dual solution). /// \pre \ref run() must be called before using this function. const EdgeIntMap &getPotential() const { return mincost_flow.potential;} + ///Checks whether the complementary slackness holds. + ///This function checks, whether the given solution is optimal ///Running after a \c run() should return with true - ///In this "state of the art" this only checks optimality, doesn't bother with feasibility + ///Currently this function only checks optimality, + ///doesn't bother with feasibility /// ///\todo Is this OK here? bool checkComplementarySlackness(){ return mincost_flow.checkComplementarySlackness(); } + ///Read the found paths. + ///This function gives back the \c j-th path in argument p. ///Assumes that \c run() has been run and nothing changed since then. - /// \warning It is assumed that \c p is constructed to be a path of graph \c G. If \c j is not less than the result of previous \c run, then the result here will be an empty path (\c j can be 0 as well). - template - void getPath(DirPath& p, size_t j){ + /// \warning It is assumed that \c p is constructed to + ///be a path of graph \c G. + ///If \c j is not less than the result of previous \c run, + ///then the result here will be an empty path (\c j can be 0 as well). + template + void getPath(Path& p, size_t j){ p.clear(); if (j>paths.size()-1){ diff -r 54d3c1599d08 -r 209c9d53e195 src/hugo/preflow.h --- a/src/hugo/preflow.h Tue Sep 14 10:23:26 2004 +0000 +++ b/src/hugo/preflow.h Tue Sep 14 10:29:47 2004 +0000 @@ -16,22 +16,22 @@ /// \addtogroup flowalgs /// @{ - ///Preflow algorithms class. + ///%Preflow algorithms class. ///This class provides an implementation of the \e preflow \e ///algorithm producing a flow of maximum value in a directed ///graph. The preflow algorithms are the fastest max flow algorithms - ///up-to-date. The \e source node, the \e target node, the \e + ///up to now. The \e source node, the \e target node, the \e ///capacity of the edges and the \e starting \e flow value of the ///edges should be passed to the algorithm through the ///constructor. It is possible to change these quantities using the ///functions \ref setSource, \ref setTarget, \ref setCap and \ref ///setFlow. /// - ///After running \c phase1 or \c preflow, the actual flow + ///After running \ref phase1() or \ref preflow(), the actual flow ///value can be obtained by calling \ref flowValue(). The minimum - ///value cut can be written into a \c node map of \c bools by - ///calling \ref minCut. (\ref minMinCut and \ref maxMinCut writes + ///value cut can be written into a bool node map by + ///calling \ref minCut(). (\ref minMinCut() and \ref maxMinCut() writes ///the inclusionwise minimum and maximum of the minimum value cuts, ///resp.) /// @@ -129,7 +129,8 @@ ///Runs the preflow algorithm. - ///Runs the preflow algorithm. + ///Runs the preflow algorithm. + /// void run() { phase1(flow_prop); phase2(); @@ -157,7 +158,7 @@ ///minimum value cut can already be computed, though a maximum flow ///is not yet obtained. So after calling this method \ref flowValue ///and \ref minCut gives proper results. - ///\warning: \ref minMinCut and \ref maxMinCut do not + ///\warning \ref minMinCut and \ref maxMinCut do not ///give minimum value cuts unless calling \ref phase2. ///\pre The starting flow must be /// - a constant zero flow if \c fp is \c ZERO_FLOW, @@ -178,7 +179,7 @@ ///minimum value cut can already be computed, though a maximum flow ///is not yet obtained. So after calling this method \ref flowValue ///and \ref actMinCut gives proper results. - ///\warning: \ref minCut, \ref minMinCut and \ref maxMinCut do not + ///\warning \ref minCut, \ref minMinCut and \ref maxMinCut do not ///give minimum value cuts unless calling \ref phase2. void phase1() {