some documentation
authormarci
Thu, 29 Apr 2004 19:25:52 +0000
changeset 48711ad69691d18
parent 486 8ebe33191347
child 488 32c3548ecc2a
some documentation
src/work/jacint/max_flow.h
     1.1 --- a/src/work/jacint/max_flow.h	Thu Apr 29 18:48:25 2004 +0000
     1.2 +++ b/src/work/jacint/max_flow.h	Thu Apr 29 19:25:52 2004 +0000
     1.3 @@ -87,6 +87,7 @@
     1.4  
     1.5    public:
     1.6   
     1.7 +    ///\todo Document this
     1.8      enum flowEnum{
     1.9        ZERO_FLOW=0,
    1.10        GEN_FLOW=1,
    1.11 @@ -104,8 +105,11 @@
    1.12        preflow( ZERO_FLOW );
    1.13      }
    1.14      
    1.15 -    /// A preflow algorithm is run. The initial edge-set have to be a flow, 
    1.16 -    /// or from a preflow, according to \c fe.
    1.17 +    /// A preflow algorithm is run. 
    1.18 +    ///\pre The initial edge-map have to be a 
    1.19 +    /// zero flow if \c fe is \c ZERO_FLOW,
    1.20 +    /// a flow if \c fe is \c GEN_FLOW, 
    1.21 +    /// and a pre-flow it is \c PREFLOW.
    1.22      void preflow( flowEnum fe ) {
    1.23        preflowPhase0(fe);
    1.24        preflowPhase1();
    1.25 @@ -121,16 +125,19 @@
    1.26      /// Starting from a flow, this method searches for an augmenting path 
    1.27      /// according to the Edmonds-Karp algorithm 
    1.28      /// and augments the flow on if any. 
    1.29 +    /// The return value shows if the augmentation was succesful.
    1.30      bool augmentOnShortestPath();
    1.31  
    1.32      /// Starting from a flow, this method searches for an augmenting blockin 
    1.33      /// flow according to Dinits' algorithm and augments the flow on if any. 
    1.34      /// The blocking flow is computed in a physically constructed 
    1.35      /// residual graph of type \c Mutablegraph.
    1.36 +    /// The return value show sif the augmentation was succesful.
    1.37      template<typename MutableGraph> bool augmentOnBlockingFlow();
    1.38  
    1.39      /// The same as \c augmentOnBlockingFlow<MutableGraph> but the 
    1.40      /// residual graph is not constructed physically.
    1.41 +    /// The return value shows if the augmentation was succesful.
    1.42      bool augmentOnBlockingFlow2();
    1.43  
    1.44      /// Returns the actual flow value.
    1.45 @@ -159,7 +166,6 @@
    1.46        }
    1.47      }
    1.48  
    1.49 -
    1.50      /// The unique inclusionwise minimum cut is computed by 
    1.51      /// processing a bfs from s in the residual graph.
    1.52      ///\pre flow have to be a max flow otherwise it will the whole node-set.
    1.53 @@ -242,10 +248,10 @@
    1.54      template<typename CutMap>
    1.55      void minCut(CutMap& M) { minMinCut(M); }
    1.56  
    1.57 -    /// 
    1.58 -    void resetSource(Node _s) {s=_s;}
    1.59      ///
    1.60 -    void resetTarget(Node _t) {t=_t;}
    1.61 +    void resetSource(Node _s) { s=_s; }
    1.62 +    ///
    1.63 +    void resetTarget(Node _t) { t=_t; }
    1.64     
    1.65      /// capacity-map is changed.
    1.66      void resetCap(const CapMap& _cap) { capacity=&_cap; }