COIN-OR::LEMON - Graph Library

Changeset 2620:8f41a3129746 in lemon-0.x


Ignore:
Timestamp:
10/05/08 15:37:17 (16 years ago)
Author:
Peter Kovacs
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3505
Message:

Doc improvements

Location:
lemon
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • lemon/capacity_scaling.h

    r2589 r2620  
    5353  ///
    5454  /// \author Peter Kovacs
    55 
    5655  template < typename Graph,
    5756             typename LowerMap = typename Graph::template EdgeMap<int>,
     
    126125      {}
    127126
    128       /// Runs the algorithm from the given source node.
     127      /// Run the algorithm from the given source node.
    129128      Node run(Node s, Capacity delta = 1) {
    130129        HeapCrossRef heap_cross_ref(_graph, Heap::PRE_HEAP);
     
    372371    }
    373372
    374     /// \brief Sets the flow map.
    375     ///
    376     /// Sets the flow map.
     373    /// \brief Set the flow map.
     374    ///
     375    /// Set the flow map.
    377376    ///
    378377    /// \return \c (*this)
     
    386385    }
    387386
    388     /// \brief Sets the potential map.
    389     ///
    390     /// Sets the potential map.
     387    /// \brief Set the potential map.
     388    ///
     389    /// Set the potential map.
    391390    ///
    392391    /// \return \c (*this)
     
    401400
    402401    /// \name Execution control
    403     /// The only way to execute the algorithm is to call the run()
    404     /// function.
    405402
    406403    /// @{
    407404
    408     /// \brief Runs the algorithm.
    409     ///
    410     /// Runs the algorithm.
     405    /// \brief Run the algorithm.
     406    ///
     407    /// This function runs the algorithm.
    411408    ///
    412409    /// \param scaling Enable or disable capacity scaling.
     
    423420
    424421    /// \name Query Functions
    425     /// The result of the algorithm can be obtained using these
    426     /// functions.
    427     /// \n run() must be called before using them.
     422    /// The results of the algorithm can be obtained using these
     423    /// functions.\n
     424    /// \ref lemon::CapacityScaling::run() "run()" must be called before
     425    /// using them.
    428426
    429427    /// @{
    430428
    431     /// \brief Returns a const reference to the edge map storing the
     429    /// \brief Return a const reference to the edge map storing the
    432430    /// found flow.
    433431    ///
    434     /// Returns a const reference to the edge map storing the found flow.
     432    /// Return a const reference to the edge map storing the found flow.
    435433    ///
    436434    /// \pre \ref run() must be called before using this function.
     
    439437    }
    440438
    441     /// \brief Returns a const reference to the node map storing the
     439    /// \brief Return a const reference to the node map storing the
    442440    /// found potentials (the dual solution).
    443441    ///
    444     /// Returns a const reference to the node map storing the found
     442    /// Return a const reference to the node map storing the found
    445443    /// potentials (the dual solution).
    446444    ///
     
    450448    }
    451449
    452     /// \brief Returns the flow on the given edge.
    453     ///
    454     /// Returns the flow on the given edge.
     450    /// \brief Return the flow on the given edge.
     451    ///
     452    /// Return the flow on the given edge.
    455453    ///
    456454    /// \pre \ref run() must be called before using this function.
     
    459457    }
    460458
    461     /// \brief Returns the potential of the given node.
    462     ///
    463     /// Returns the potential of the given node.
     459    /// \brief Return the potential of the given node.
     460    ///
     461    /// Return the potential of the given node.
    464462    ///
    465463    /// \pre \ref run() must be called before using this function.
     
    468466    }
    469467
    470     /// \brief Returns the total cost of the found flow.
    471     ///
    472     /// Returns the total cost of the found flow. The complexity of the
     468    /// \brief Return the total cost of the found flow.
     469    ///
     470    /// Return the total cost of the found flow. The complexity of the
    473471    /// function is \f$ O(e) \f$.
    474472    ///
     
    485483  private:
    486484
    487     /// Initializes the algorithm.
     485    /// Initialize the algorithm.
    488486    bool init(bool scaling) {
    489487      if (!_valid_supply) return false;
     
    536534    }
    537535
    538     /// Executes the capacity scaling algorithm.
     536    /// Execute the capacity scaling algorithm.
    539537    bool startWithScaling() {
    540538      // Processing capacity scaling phases
     
    568566          if (_excess[n] <= -_delta) _deficit_nodes.push_back(n);
    569567        }
    570         int next_node = 0;
     568        int next_node = 0, next_def_node = 0;
    571569
    572570        // Finding augmenting shortest paths
     
    575573          if (_delta > 1) {
    576574            bool delta_deficit = false;
    577             for (int i = 0; i < int(_deficit_nodes.size()); ++i) {
    578               if (_excess[_deficit_nodes[i]] <= -_delta) {
     575            for ( ; next_def_node < int(_deficit_nodes.size());
     576                    ++next_def_node ) {
     577              if (_excess[_deficit_nodes[next_def_node]] <= -_delta) {
    579578                delta_deficit = true;
    580579                break;
     
    642641    }
    643642
    644     /// Executes the successive shortest path algorithm.
     643    /// Execute the successive shortest path algorithm.
    645644    bool startWithoutScaling() {
    646645      // Finding excess nodes
  • lemon/cost_scaling.h

    r2588 r2620  
    6565  ///
    6666  /// \author Peter Kovacs
    67 
    6867  template < typename Graph,
    6968             typename LowerMap = typename Graph::template EdgeMap<int>,
     
    103102    /// \brief Map adaptor class for handling residual edge costs.
    104103    ///
    105     /// \ref ResidualCostMap is a map adaptor class for handling
    106     /// residual edge costs.
     104    /// Map adaptor class for handling residual edge costs.
    107105    template <typename Map>
    108106    class ResidualCostMap : public MapBase<ResEdge, typename Map::Value>
     
    127125    /// \brief Map adaptor class for handling reduced edge costs.
    128126    ///
    129     /// \ref ReducedCostMap is a map adaptor class for handling reduced
    130     /// edge costs.
     127    /// Map adaptor class for handling reduced edge costs.
    131128    class ReducedCostMap : public MapBase<Edge, LCost>
    132129    {
     
    327324    }
    328325
    329     /// \brief Sets the flow map.
    330     ///
    331     /// Sets the flow map.
     326    /// \brief Set the flow map.
     327    ///
     328    /// Set the flow map.
    332329    ///
    333330    /// \return \c (*this)
     
    341338    }
    342339
    343     /// \brief Sets the potential map.
    344     ///
    345     /// Sets the potential map.
     340    /// \brief Set the potential map.
     341    ///
     342    /// Set the potential map.
    346343    ///
    347344    /// \return \c (*this)
     
    356353
    357354    /// \name Execution control
    358     /// The only way to execute the algorithm is to call the run()
    359     /// function.
    360355
    361356    /// @{
    362357
    363     /// \brief Runs the algorithm.
    364     ///
    365     /// Runs the algorithm.
     358    /// \brief Run the algorithm.
     359    ///
     360    /// Run the algorithm.
    366361    ///
    367362    /// \return \c true if a feasible flow can be found.
     
    374369    /// \name Query Functions
    375370    /// The result of the algorithm can be obtained using these
    376     /// functions.
    377     /// \n run() must be called before using them.
     371    /// functions.\n
     372    /// \ref lemon::CostScaling::run() "run()" must be called before
     373    /// using them.
    378374
    379375    /// @{
    380376
    381     /// \brief Returns a const reference to the edge map storing the
     377    /// \brief Return a const reference to the edge map storing the
    382378    /// found flow.
    383379    ///
    384     /// Returns a const reference to the edge map storing the found flow.
     380    /// Return a const reference to the edge map storing the found flow.
    385381    ///
    386382    /// \pre \ref run() must be called before using this function.
     
    389385    }
    390386
    391     /// \brief Returns a const reference to the node map storing the
     387    /// \brief Return a const reference to the node map storing the
    392388    /// found potentials (the dual solution).
    393389    ///
    394     /// Returns a const reference to the node map storing the found
     390    /// Return a const reference to the node map storing the found
    395391    /// potentials (the dual solution).
    396392    ///
     
    400396    }
    401397
    402     /// \brief Returns the flow on the given edge.
    403     ///
    404     /// Returns the flow on the given edge.
     398    /// \brief Return the flow on the given edge.
     399    ///
     400    /// Return the flow on the given edge.
    405401    ///
    406402    /// \pre \ref run() must be called before using this function.
     
    409405    }
    410406
    411     /// \brief Returns the potential of the given node.
    412     ///
    413     /// Returns the potential of the given node.
     407    /// \brief Return the potential of the given node.
     408    ///
     409    /// Return the potential of the given node.
    414410    ///
    415411    /// \pre \ref run() must be called before using this function.
     
    418414    }
    419415
    420     /// \brief Returns the total cost of the found flow.
    421     ///
    422     /// Returns the total cost of the found flow. The complexity of the
     416    /// \brief Return the total cost of the found flow.
     417    ///
     418    /// Return the total cost of the found flow. The complexity of the
    423419    /// function is \f$ O(e) \f$.
    424420    ///
     
    435431  private:
    436432
    437     /// Initializes the algorithm.
     433    /// Initialize the algorithm.
    438434    bool init() {
    439435      if (!_valid_supply) return false;
     
    470466
    471467
    472     /// Executes the algorithm.
     468    /// Execute the algorithm.
    473469    bool start() {
    474470      std::deque<Node> active_nodes;
  • lemon/cycle_canceling.h

    r2593 r2620  
    6565  ///
    6666  /// \author Peter Kovacs
    67 
    6867  template < typename Graph,
    6968             typename LowerMap = typename Graph::template EdgeMap<int>,
     
    9998    /// \brief Map adaptor class for handling residual edge costs.
    10099    ///
    101     /// \ref ResidualCostMap is a map adaptor class for handling
    102     /// residual edge costs.
     100    /// Map adaptor class for handling residual edge costs.
    103101    class ResidualCostMap : public MapBase<ResEdge, Cost>
    104102    {
     
    279277    }
    280278
    281     /// \brief Sets the flow map.
    282     ///
    283     /// Sets the flow map.
     279    /// \brief Set the flow map.
     280    ///
     281    /// Set the flow map.
    284282    ///
    285283    /// \return \c (*this)
     
    293291    }
    294292
    295     /// \brief Sets the potential map.
    296     ///
    297     /// Sets the potential map.
     293    /// \brief Set the potential map.
     294    ///
     295    /// Set the potential map.
    298296    ///
    299297    /// \return \c (*this)
     
    308306
    309307    /// \name Execution control
    310     /// The only way to execute the algorithm is to call the run()
    311     /// function.
    312308
    313309    /// @{
    314310
    315     /// \brief Runs the algorithm.
    316     ///
    317     /// Runs the algorithm.
     311    /// \brief Run the algorithm.
     312    ///
     313    /// Run the algorithm.
    318314    ///
    319315    /// \param min_mean_cc Set this parameter to \c true to run the
     
    330326    /// \name Query Functions
    331327    /// The result of the algorithm can be obtained using these
    332     /// functions.
    333     /// \n run() must be called before using them.
     328    /// functions.\n
     329    /// \ref lemon::CycleCanceling::run() "run()" must be called before
     330    /// using them.
    334331
    335332    /// @{
    336333
    337     /// \brief Returns a const reference to the edge map storing the
     334    /// \brief Return a const reference to the edge map storing the
    338335    /// found flow.
    339336    ///
    340     /// Returns a const reference to the edge map storing the found flow.
     337    /// Return a const reference to the edge map storing the found flow.
    341338    ///
    342339    /// \pre \ref run() must be called before using this function.
     
    345342    }
    346343
    347     /// \brief Returns a const reference to the node map storing the
     344    /// \brief Return a const reference to the node map storing the
    348345    /// found potentials (the dual solution).
    349346    ///
    350     /// Returns a const reference to the node map storing the found
     347    /// Return a const reference to the node map storing the found
    351348    /// potentials (the dual solution).
    352349    ///
     
    356353    }
    357354
    358     /// \brief Returns the flow on the given edge.
    359     ///
    360     /// Returns the flow on the given edge.
     355    /// \brief Return the flow on the given edge.
     356    ///
     357    /// Return the flow on the given edge.
    361358    ///
    362359    /// \pre \ref run() must be called before using this function.
     
    365362    }
    366363
    367     /// \brief Returns the potential of the given node.
    368     ///
    369     /// Returns the potential of the given node.
     364    /// \brief Return the potential of the given node.
     365    ///
     366    /// Return the potential of the given node.
    370367    ///
    371368    /// \pre \ref run() must be called before using this function.
     
    374371    }
    375372
    376     /// \brief Returns the total cost of the found flow.
    377     ///
    378     /// Returns the total cost of the found flow. The complexity of the
     373    /// \brief Return the total cost of the found flow.
     374    ///
     375    /// Return the total cost of the found flow. The complexity of the
    379376    /// function is \f$ O(e) \f$.
    380377    ///
     
    391388  private:
    392389
    393     /// Initializes the algorithm.
     390    /// Initialize the algorithm.
    394391    bool init() {
    395392      if (!_valid_supply) return false;
     
    429426    }
    430427
    431     /// \brief Executes the algorithm using \ref BellmanFord.
    432     ///
    433     /// Executes the algorithm using the \ref BellmanFord
     428    /// \brief Execute the algorithm using \ref BellmanFord.
     429    ///
     430    /// Execute the algorithm using the \ref BellmanFord
    434431    /// "Bellman-Ford" algorithm for negative cycle detection with
    435432    /// successively larger limit for the number of iterations.
     
    507504    }
    508505
    509     /// \brief Executes the algorithm using \ref MinMeanCycle.
    510     ///
    511     /// Executes the algorithm using \ref MinMeanCycle for negative
     506    /// \brief Execute the algorithm using \ref MinMeanCycle.
     507    ///
     508    /// Execute the algorithm using \ref MinMeanCycle for negative
    512509    /// cycle detection.
    513510    void startMinMean() {
  • lemon/min_cost_flow.h

    r2588 r2620  
    6363  ///
    6464  /// \author Peter Kovacs
    65 
    6665  template < typename Graph,
    6766             typename LowerMap = typename Graph::template EdgeMap<int>,
  • lemon/min_cost_max_flow.h

    r2587 r2620  
    5959  ///
    6060  /// \author Peter Kovacs
    61 
    6261  template < typename Graph,
    6362             typename CapacityMap = typename Graph::template EdgeMap<int>,
     
    128127    }
    129128
    130     /// \brief Sets the flow map.
    131     ///
    132     /// Sets the flow map.
     129    /// \brief Set the flow map.
     130    ///
     131    /// Set the flow map.
    133132    ///
    134133    /// \return \c (*this)
     
    142141    }
    143142
    144     /// \brief Sets the potential map.
    145     ///
    146     /// Sets the potential map.
     143    /// \brief Set the potential map.
     144    ///
     145    /// Set the potential map.
    147146    ///
    148147    /// \return \c (*this)
     
    157156
    158157    /// \name Execution control
    159     /// The only way to execute the algorithm is to call the run()
    160     /// function.
    161158
    162159    /// @{
    163160
    164     /// \brief Runs the algorithm.
    165     ///
    166     /// Runs the algorithm.
     161    /// \brief Run the algorithm.
     162    ///
     163    /// Run the algorithm.
    167164    void run() {
    168165      // Initializing maps
     
    187184
    188185    /// \name Query Functions
    189     /// The result of the algorithm can be obtained using these
    190     /// functions.
    191     /// \n run() must be called before using them.
     186    /// The results of the algorithm can be obtained using these
     187    /// functions.\n
     188    /// \ref lemon::MinCostMaxFlow::run() "run()" must be called before
     189    /// using them.
    192190
    193191    /// @{
    194192
    195     /// \brief Returns a const reference to the edge map storing the
     193    /// \brief Return a const reference to the edge map storing the
    196194    /// found flow.
    197195    ///
    198     /// Returns a const reference to the edge map storing the found flow.
     196    /// Return a const reference to the edge map storing the found flow.
    199197    ///
    200198    /// \pre \ref run() must be called before using this function.
     
    203201    }
    204202
    205     /// \brief Returns a const reference to the node map storing the
     203    /// \brief Return a const reference to the node map storing the
    206204    /// found potentials (the dual solution).
    207205    ///
    208     /// Returns a const reference to the node map storing the found
     206    /// Return a const reference to the node map storing the found
    209207    /// potentials (the dual solution).
    210208    ///
     
    214212    }
    215213
    216     /// \brief Returns the flow on the given edge.
    217     ///
    218     /// Returns the flow on the given edge.
     214    /// \brief Return the flow on the given edge.
     215    ///
     216    /// Return the flow on the given edge.
    219217    ///
    220218    /// \pre \ref run() must be called before using this function.
     
    223221    }
    224222
    225     /// \brief Returns the potential of the given node.
    226     ///
    227     /// Returns the potential of the given node.
     223    /// \brief Return the potential of the given node.
     224    ///
     225    /// Return the potential of the given node.
    228226    ///
    229227    /// \pre \ref run() must be called before using this function.
     
    232230    }
    233231
    234     /// \brief Returns the total cost of the found flow.
    235     ///
    236     /// Returns the total cost of the found flow. The complexity of the
     232    /// \brief Return the total cost of the found flow.
     233    ///
     234    /// Return the total cost of the found flow. The complexity of the
    237235    /// function is \f$ O(e) \f$.
    238236    ///
  • lemon/min_mean_cycle.h

    r2618 r2620  
    233233      return true;
    234234    }
    235    
     235
    236236    /// @}
    237237
     
    242242
    243243    /// @{
    244    
     244
    245245    /// \brief Returns the total length of the found cycle.
    246246    ///
     
    292292      return *_cycle_path;
    293293    }
    294    
     294
    295295    ///@}
    296    
     296
    297297  private:
    298298
Note: See TracChangeset for help on using the changeset viewer.