COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
03/29/09 23:08:20 (10 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Various doc improvements (#248)

  • Rename all the ugly template parameters (too long and/or starting with an underscore).
  • Rename function parameters starting with an underscore.
  • Extend the doc for many classes.
  • Use LaTeX-style O(...) expressions only for the complicated ones.
  • A lot of small unification changes.
  • Small fixes.
  • Some other improvements.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/min_cost_arborescence.h

    r522 r606  
    3636  ///
    3737  /// Default traits class for MinCostArborescence class.
    38   /// \param _Digraph Digraph type.
    39   /// \param _CostMap Type of cost map.
    40   template <class _Digraph, class _CostMap>
     38  /// \param GR Digraph type.
     39  /// \param CM Type of cost map.
     40  template <class GR, class CM>
    4141  struct MinCostArborescenceDefaultTraits{
    4242
    4343    /// \brief The digraph type the algorithm runs on.
    44     typedef _Digraph Digraph;
     44    typedef GR Digraph;
    4545
    4646    /// \brief The type of the map that stores the arc costs.
     
    4848    /// The type of the map that stores the arc costs.
    4949    /// It must meet the \ref concepts::ReadMap "ReadMap" concept.
    50     typedef _CostMap CostMap;
     50    typedef CM CostMap;
    5151
    5252    /// \brief The value type of the costs.
     
    6464    typedef typename Digraph::template ArcMap<bool> ArborescenceMap;
    6565
    66     /// \brief Instantiates a ArborescenceMap.
    67     ///
    68     /// This function instantiates a \ref ArborescenceMap.
     66    /// \brief Instantiates a \c ArborescenceMap.
     67    ///
     68    /// This function instantiates a \c ArborescenceMap.
    6969    /// \param digraph is the graph, to which we would like to
    70     /// calculate the ArborescenceMap.
     70    /// calculate the \c ArborescenceMap.
    7171    static ArborescenceMap *createArborescenceMap(const Digraph &digraph){
    7272      return new ArborescenceMap(digraph);
    7373    }
    7474
    75     /// \brief The type of the PredMap
    76     ///
    77     /// The type of the PredMap. It is a node map with an arc value type.
     75    /// \brief The type of the \c PredMap
     76    ///
     77    /// The type of the \c PredMap. It is a node map with an arc value type.
    7878    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
    7979
    80     /// \brief Instantiates a PredMap.
    81     ///
    82     /// This function instantiates a \ref PredMap.
    83     /// \param _digraph is the digraph, to which we would like to define the
    84     /// PredMap.
     80    /// \brief Instantiates a \c PredMap.
     81    ///
     82    /// This function instantiates a \c PredMap.
     83    /// \param digraph The digraph to which we would like to define the
     84    /// \c PredMap.
    8585    static PredMap *createPredMap(const Digraph &digraph){
    8686      return new PredMap(digraph);
     
    9999  /// the minimum cost subgraph which are union of arborescences with the
    100100  /// given sources and spans all the nodes which are reachable from the
    101   /// sources. The time complexity of the algorithm is \f$ O(n^2+e) \f$.
     101  /// sources. The time complexity of the algorithm is O(n<sup>2</sup>+e).
    102102  ///
    103103  /// The algorithm provides also an optimal dual solution, therefore
    104104  /// the optimality of the solution can be checked.
    105105  ///
    106   /// \param _Digraph The digraph type the algorithm runs on. The default value
     106  /// \param GR The digraph type the algorithm runs on. The default value
    107107  /// is \ref ListDigraph.
    108   /// \param _CostMap This read-only ArcMap determines the costs of the
     108  /// \param CM This read-only ArcMap determines the costs of the
    109109  /// arcs. It is read once for each arc, so the map may involve in
    110110  /// relatively time consuming process to compute the arc cost if
    111111  /// it is necessary. The default map type is \ref
    112112  /// concepts::Digraph::ArcMap "Digraph::ArcMap<int>".
    113   /// \param _Traits Traits class to set various data types used
     113  /// \param TR Traits class to set various data types used
    114114  /// by the algorithm. The default traits class is
    115115  /// \ref MinCostArborescenceDefaultTraits
    116   /// "MinCostArborescenceDefaultTraits<_Digraph, _CostMap>".  See \ref
     116  /// "MinCostArborescenceDefaultTraits<GR, CM>".  See \ref
    117117  /// MinCostArborescenceDefaultTraits for the documentation of a
    118118  /// MinCostArborescence traits class.
    119   ///
    120   /// \author Balazs Dezso
    121119#ifndef DOXYGEN
    122   template <typename _Digraph = ListDigraph,
    123             typename _CostMap = typename _Digraph::template ArcMap<int>,
    124             typename _Traits =
    125             MinCostArborescenceDefaultTraits<_Digraph, _CostMap> >
     120  template <typename GR = ListDigraph,
     121            typename CM = typename GR::template ArcMap<int>,
     122            typename TR =
     123              MinCostArborescenceDefaultTraits<GR, CM> >
    126124#else
    127   template <typename _Digraph, typename _CostMap, typedef _Traits>
     125  template <typename GR, typename CM, typedef TR>
    128126#endif
    129127  class MinCostArborescence {
     
    131129
    132130    /// The traits.
    133     typedef _Traits Traits;
     131    typedef TR Traits;
    134132    /// The type of the underlying digraph.
    135133    typedef typename Traits::Digraph Digraph;
     
    441439    /// \brief Constructor.
    442440    ///
    443     /// \param _digraph The digraph the algorithm will run on.
    444     /// \param _cost The cost map used by the algorithm.
     441    /// \param digraph The digraph the algorithm will run on.
     442    /// \param cost The cost map used by the algorithm.
    445443    MinCostArborescence(const Digraph& digraph, const CostMap& cost)
    446444      : _digraph(&digraph), _cost(&cost), _pred(0), local_pred(false),
     
    457455    ///
    458456    /// Sets the arborescence map.
    459     /// \return \c (*this)
     457    /// \return <tt>(*this)</tt>
    460458    MinCostArborescence& arborescenceMap(ArborescenceMap& m) {
    461459      if (local_arborescence) {
     
    470468    ///
    471469    /// Sets the arborescence map.
    472     /// \return \c (*this)
     470    /// \return <tt>(*this)</tt>
    473471    MinCostArborescence& predMap(PredMap& m) {
    474472      if (local_pred) {
Note: See TracChangeset for help on using the changeset viewer.