diff -r 94387da47f79 -r c5fd2d996909 lemon/min_cost_arborescence.h --- a/lemon/min_cost_arborescence.h Thu Mar 05 10:13:20 2009 +0000 +++ b/lemon/min_cost_arborescence.h Sun Mar 29 23:08:20 2009 +0200 @@ -35,19 +35,19 @@ /// \brief Default traits class for MinCostArborescence class. /// /// Default traits class for MinCostArborescence class. - /// \param _Digraph Digraph type. - /// \param _CostMap Type of cost map. - template + /// \param GR Digraph type. + /// \param CM Type of cost map. + template struct MinCostArborescenceDefaultTraits{ /// \brief The digraph type the algorithm runs on. - typedef _Digraph Digraph; + typedef GR Digraph; /// \brief The type of the map that stores the arc costs. /// /// The type of the map that stores the arc costs. /// It must meet the \ref concepts::ReadMap "ReadMap" concept. - typedef _CostMap CostMap; + typedef CM CostMap; /// \brief The value type of the costs. /// @@ -63,25 +63,25 @@ /// arc. After it will set all arborescence arcs once. typedef typename Digraph::template ArcMap ArborescenceMap; - /// \brief Instantiates a ArborescenceMap. + /// \brief Instantiates a \c ArborescenceMap. /// - /// This function instantiates a \ref ArborescenceMap. + /// This function instantiates a \c ArborescenceMap. /// \param digraph is the graph, to which we would like to - /// calculate the ArborescenceMap. + /// calculate the \c ArborescenceMap. static ArborescenceMap *createArborescenceMap(const Digraph &digraph){ return new ArborescenceMap(digraph); } - /// \brief The type of the PredMap + /// \brief The type of the \c PredMap /// - /// The type of the PredMap. It is a node map with an arc value type. + /// The type of the \c PredMap. It is a node map with an arc value type. typedef typename Digraph::template NodeMap PredMap; - /// \brief Instantiates a PredMap. + /// \brief Instantiates a \c PredMap. /// - /// This function instantiates a \ref PredMap. - /// \param _digraph is the digraph, to which we would like to define the - /// PredMap. + /// This function instantiates a \c PredMap. + /// \param digraph The digraph to which we would like to define the + /// \c PredMap. static PredMap *createPredMap(const Digraph &digraph){ return new PredMap(digraph); } @@ -98,39 +98,37 @@ /// more sources should be given for the algorithm and it will calculate /// the minimum cost subgraph which are union of arborescences with the /// given sources and spans all the nodes which are reachable from the - /// sources. The time complexity of the algorithm is \f$ O(n^2+e) \f$. + /// sources. The time complexity of the algorithm is O(n2+e). /// /// The algorithm provides also an optimal dual solution, therefore /// the optimality of the solution can be checked. /// - /// \param _Digraph The digraph type the algorithm runs on. The default value + /// \param GR The digraph type the algorithm runs on. The default value /// is \ref ListDigraph. - /// \param _CostMap This read-only ArcMap determines the costs of the + /// \param CM This read-only ArcMap determines the costs of the /// arcs. It is read once for each arc, so the map may involve in /// relatively time consuming process to compute the arc cost if /// it is necessary. The default map type is \ref /// concepts::Digraph::ArcMap "Digraph::ArcMap". - /// \param _Traits Traits class to set various data types used + /// \param TR Traits class to set various data types used /// by the algorithm. The default traits class is /// \ref MinCostArborescenceDefaultTraits - /// "MinCostArborescenceDefaultTraits<_Digraph, _CostMap>". See \ref + /// "MinCostArborescenceDefaultTraits". See \ref /// MinCostArborescenceDefaultTraits for the documentation of a /// MinCostArborescence traits class. - /// - /// \author Balazs Dezso #ifndef DOXYGEN - template , - typename _Traits = - MinCostArborescenceDefaultTraits<_Digraph, _CostMap> > + template , + typename TR = + MinCostArborescenceDefaultTraits > #else - template + template #endif class MinCostArborescence { public: /// The traits. - typedef _Traits Traits; + typedef TR Traits; /// The type of the underlying digraph. typedef typename Traits::Digraph Digraph; /// The type of the map that stores the arc costs. @@ -440,8 +438,8 @@ /// \brief Constructor. /// - /// \param _digraph The digraph the algorithm will run on. - /// \param _cost The cost map used by the algorithm. + /// \param digraph The digraph the algorithm will run on. + /// \param cost The cost map used by the algorithm. MinCostArborescence(const Digraph& digraph, const CostMap& cost) : _digraph(&digraph), _cost(&cost), _pred(0), local_pred(false), _arborescence(0), local_arborescence(false), @@ -456,7 +454,7 @@ /// \brief Sets the arborescence map. /// /// Sets the arborescence map. - /// \return \c (*this) + /// \return (*this) MinCostArborescence& arborescenceMap(ArborescenceMap& m) { if (local_arborescence) { delete _arborescence; @@ -469,7 +467,7 @@ /// \brief Sets the arborescence map. /// /// Sets the arborescence map. - /// \return \c (*this) + /// \return (*this) MinCostArborescence& predMap(PredMap& m) { if (local_pred) { delete _pred;