COIN-OR::LEMON - Graph Library

Changeset 525:9605e051942f in lemon


Ignore:
Timestamp:
02/23/09 12:10:26 (9 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Message:

Various doc improvements

Location:
lemon
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • lemon/bfs.h

    r463 r525  
    5050    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    5151    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap; 
    52     ///Instantiates a PredMap. 
    53  
    54     ///This function instantiates a PredMap. 
     52    ///Instantiates a \c PredMap. 
     53 
     54    ///This function instantiates a \ref PredMap. 
    5555    ///\param g is the digraph, to which we would like to define the 
    56     ///PredMap. 
     56    ///\ref PredMap. 
    5757    static PredMap *createPredMap(const Digraph &g) 
    5858    { 
     
    6565    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    6666    typedef NullMap<typename Digraph::Node,bool> ProcessedMap; 
    67     ///Instantiates a ProcessedMap. 
    68  
    69     ///This function instantiates a ProcessedMap. 
     67    ///Instantiates a \c ProcessedMap. 
     68 
     69    ///This function instantiates a \ref ProcessedMap. 
    7070    ///\param g is the digraph, to which 
    71     ///we would like to define the ProcessedMap 
     71    ///we would like to define the \ref ProcessedMap 
    7272#ifdef DOXYGEN 
    7373    static ProcessedMap *createProcessedMap(const Digraph &g) 
     
    8484    ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept. 
    8585    typedef typename Digraph::template NodeMap<bool> ReachedMap; 
    86     ///Instantiates a ReachedMap. 
    87  
    88     ///This function instantiates a ReachedMap. 
     86    ///Instantiates a \c ReachedMap. 
     87 
     88    ///This function instantiates a \ref ReachedMap. 
    8989    ///\param g is the digraph, to which 
    90     ///we would like to define the ReachedMap. 
     90    ///we would like to define the \ref ReachedMap. 
    9191    static ReachedMap *createReachedMap(const Digraph &g) 
    9292    { 
     
    9999    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    100100    typedef typename Digraph::template NodeMap<int> DistMap; 
    101     ///Instantiates a DistMap. 
    102  
    103     ///This function instantiates a DistMap. 
     101    ///Instantiates a \c DistMap. 
     102 
     103    ///This function instantiates a \ref DistMap. 
    104104    ///\param g is the digraph, to which we would like to define the 
    105     ///DistMap. 
     105    ///\ref DistMap. 
    106106    static DistMap *createDistMap(const Digraph &g) 
    107107    { 
     
    222222    }; 
    223223    ///\brief \ref named-templ-param "Named parameter" for setting 
    224     ///PredMap type. 
     224    ///\c PredMap type. 
    225225    /// 
    226226    ///\ref named-templ-param "Named parameter" for setting 
    227     ///PredMap type. 
     227    ///\c PredMap type. 
    228228    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    229229    template <class T> 
     
    242242    }; 
    243243    ///\brief \ref named-templ-param "Named parameter" for setting 
    244     ///DistMap type. 
     244    ///\c DistMap type. 
    245245    /// 
    246246    ///\ref named-templ-param "Named parameter" for setting 
    247     ///DistMap type. 
     247    ///\c DistMap type. 
    248248    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    249249    template <class T> 
     
    262262    }; 
    263263    ///\brief \ref named-templ-param "Named parameter" for setting 
    264     ///ReachedMap type. 
     264    ///\c ReachedMap type. 
    265265    /// 
    266266    ///\ref named-templ-param "Named parameter" for setting 
    267     ///ReachedMap type. 
     267    ///\c ReachedMap type. 
    268268    ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept. 
    269269    template <class T> 
     
    282282    }; 
    283283    ///\brief \ref named-templ-param "Named parameter" for setting 
    284     ///ProcessedMap type. 
     284    ///\c ProcessedMap type. 
    285285    /// 
    286286    ///\ref named-templ-param "Named parameter" for setting 
    287     ///ProcessedMap type. 
     287    ///\c ProcessedMap type. 
    288288    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    289289    template <class T> 
     
    301301    }; 
    302302    ///\brief \ref named-templ-param "Named parameter" for setting 
    303     ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. 
     303    ///\c ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. 
    304304    /// 
    305305    ///\ref named-templ-param "Named parameter" for setting 
    306     ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. 
     306    ///\c ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. 
    307307    ///If you don't set it explicitly, it will be automatically allocated. 
    308308    struct SetStandardProcessedMap : 
     
    11951195  /// This class defines the interface of the BfsVisit events, and 
    11961196  /// it could be the base of a real visitor class. 
    1197   template <typename _Digraph> 
     1197  template <typename GR> 
    11981198  struct BfsVisitor { 
    1199     typedef _Digraph Digraph; 
     1199    typedef GR Digraph; 
    12001200    typedef typename Digraph::Arc Arc; 
    12011201    typedef typename Digraph::Node Node; 
     
    12251225  }; 
    12261226#else 
    1227   template <typename _Digraph> 
     1227  template <typename GR> 
    12281228  struct BfsVisitor { 
    1229     typedef _Digraph Digraph; 
     1229    typedef GR Digraph; 
    12301230    typedef typename Digraph::Arc Arc; 
    12311231    typedef typename Digraph::Node Node; 
     
    12551255  /// 
    12561256  /// Default traits class of BfsVisit class. 
    1257   /// \tparam _Digraph The type of the digraph the algorithm runs on. 
    1258   template<class _Digraph> 
     1257  /// \tparam GR The type of the digraph the algorithm runs on. 
     1258  template<class GR> 
    12591259  struct BfsVisitDefaultTraits { 
    12601260 
    12611261    /// \brief The type of the digraph the algorithm runs on. 
    1262     typedef _Digraph Digraph; 
     1262    typedef GR Digraph; 
    12631263 
    12641264    /// \brief The type of the map that indicates which nodes are reached. 
     
    12811281  /// \ingroup search 
    12821282  /// 
    1283   /// \brief %BFS algorithm class with visitor interface. 
     1283  /// \brief BFS algorithm class with visitor interface. 
    12841284  /// 
    1285   /// This class provides an efficient implementation of the %BFS algorithm 
     1285  /// This class provides an efficient implementation of the BFS algorithm 
    12861286  /// with visitor interface. 
    12871287  /// 
    1288   /// The %BfsVisit class provides an alternative interface to the Bfs 
     1288  /// The BfsVisit class provides an alternative interface to the Bfs 
    12891289  /// class. It works with callback mechanism, the BfsVisit object calls 
    12901290  /// the member functions of the \c Visitor class on every BFS event. 
     
    12951295  /// instead. 
    12961296  /// 
    1297   /// \tparam _Digraph The type of the digraph the algorithm runs on. 
    1298   /// The default value is 
    1299   /// \ref ListDigraph. The value of _Digraph is not used directly by 
    1300   /// \ref BfsVisit, it is only passed to \ref BfsVisitDefaultTraits. 
    1301   /// \tparam _Visitor The Visitor type that is used by the algorithm. 
    1302   /// \ref BfsVisitor "BfsVisitor<_Digraph>" is an empty visitor, which 
     1297  /// \tparam GR The type of the digraph the algorithm runs on. 
     1298  /// The default type is \ref ListDigraph. 
     1299  /// The value of GR is not used directly by \ref BfsVisit, 
     1300  /// it is only passed to \ref BfsVisitDefaultTraits. 
     1301  /// \tparam VS The Visitor type that is used by the algorithm. 
     1302  /// \ref BfsVisitor "BfsVisitor<GR>" is an empty visitor, which 
    13031303  /// does not observe the BFS events. If you want to observe the BFS 
    13041304  /// events, you should implement your own visitor class. 
    1305   /// \tparam _Traits Traits class to set various data types used by the 
     1305  /// \tparam TR Traits class to set various data types used by the 
    13061306  /// algorithm. The default traits class is 
    1307   /// \ref BfsVisitDefaultTraits "BfsVisitDefaultTraits<_Digraph>". 
     1307  /// \ref BfsVisitDefaultTraits "BfsVisitDefaultTraits<GR>". 
    13081308  /// See \ref BfsVisitDefaultTraits for the documentation of 
    13091309  /// a BFS visit traits class. 
    13101310#ifdef DOXYGEN 
    1311   template <typename _Digraph, typename _Visitor, typename _Traits> 
     1311  template <typename GR, typename VS, typename TR> 
    13121312#else 
    1313   template <typename _Digraph = ListDigraph, 
    1314             typename _Visitor = BfsVisitor<_Digraph>, 
    1315             typename _Traits = BfsVisitDefaultTraits<_Digraph> > 
     1313  template <typename GR = ListDigraph, 
     1314            typename VS = BfsVisitor<GR>, 
     1315            typename TR = BfsVisitDefaultTraits<GR> > 
    13161316#endif 
    13171317  class BfsVisit { 
     
    13191319 
    13201320    ///The traits class. 
    1321     typedef _Traits Traits; 
     1321    typedef TR Traits; 
    13221322 
    13231323    ///The type of the digraph the algorithm runs on. 
     
    13251325 
    13261326    ///The visitor type used by the algorithm. 
    1327     typedef _Visitor Visitor; 
     1327    typedef VS Visitor; 
    13281328 
    13291329    ///The type of the map that indicates which nodes are reached. 
  • lemon/bits/array_map.h

    r463 r525  
    136136    // \brief Template assign operator. 
    137137    // 
    138     // The given parameter should be conform to the ReadMap 
     138    // The given parameter should conform to the ReadMap 
    139139    // concecpt and could be indiced by the current item set of 
    140140    // the NodeMap. In this case the value for each item 
  • lemon/bits/vector_map.h

    r463 r525  
    125125    // \brief Template assign operator. 
    126126    // 
    127     // The given parameter should be conform to the ReadMap 
     127    // The given parameter should conform to the ReadMap 
    128128    // concecpt and could be indiced by the current item set of 
    129129    // the NodeMap. In this case the value for each item 
  • lemon/circulation.h

    r463 r525  
    3232  /// 
    3333  /// Default traits class of Circulation class. 
    34   /// \tparam _Diraph Digraph type. 
    35   /// \tparam _LCapMap Lower bound capacity map type. 
    36   /// \tparam _UCapMap Upper bound capacity map type. 
    37   /// \tparam _DeltaMap Delta map type. 
    38   template <typename _Diraph, typename _LCapMap, 
    39             typename _UCapMap, typename _DeltaMap> 
     34  /// \tparam GR Digraph type. 
     35  /// \tparam LM Lower bound capacity map type. 
     36  /// \tparam UM Upper bound capacity map type. 
     37  /// \tparam DM Delta map type. 
     38  template <typename GR, typename LM, 
     39            typename UM, typename DM> 
    4040  struct CirculationDefaultTraits { 
    4141 
    4242    /// \brief The type of the digraph the algorithm runs on. 
    43     typedef _Diraph Digraph; 
     43    typedef GR Digraph; 
    4444 
    4545    /// \brief The type of the map that stores the circulation lower 
     
    4848    /// The type of the map that stores the circulation lower bound. 
    4949    /// It must meet the \ref concepts::ReadMap "ReadMap" concept. 
    50     typedef _LCapMap LCapMap; 
     50    typedef LM LCapMap; 
    5151 
    5252    /// \brief The type of the map that stores the circulation upper 
     
    5555    /// The type of the map that stores the circulation upper bound. 
    5656    /// It must meet the \ref concepts::ReadMap "ReadMap" concept. 
    57     typedef _UCapMap UCapMap; 
     57    typedef UM UCapMap; 
    5858 
    5959    /// \brief The type of the map that stores the lower bound for 
     
    6363    /// of the nodes. It must meet the \ref concepts::ReadMap "ReadMap" 
    6464    /// concept. 
    65     typedef _DeltaMap DeltaMap; 
     65    typedef DM DeltaMap; 
    6666 
    6767    /// \brief The type of the flow values. 
     
    138138     in this way. 
    139139 
    140      \tparam _Digraph The type of the digraph the algorithm runs on. 
    141      \tparam _LCapMap The type of the lower bound capacity map. The default 
    142      map type is \ref concepts::Digraph::ArcMap "_Digraph::ArcMap<int>". 
    143      \tparam _UCapMap The type of the upper bound capacity map. The default 
    144      map type is \c _LCapMap. 
    145      \tparam _DeltaMap The type of the map that stores the lower bound 
     140     \tparam GR The type of the digraph the algorithm runs on. 
     141     \tparam LM The type of the lower bound capacity map. The default 
     142     map type is \ref concepts::Digraph::ArcMap "GR::ArcMap<int>". 
     143     \tparam UM The type of the upper bound capacity map. The default 
     144     map type is \c LM. 
     145     \tparam DM The type of the map that stores the lower bound 
    146146     for the supply of the nodes. The default map type is 
    147      \c _Digraph::ArcMap<_UCapMap::Value>. 
     147     \ref concepts::Digraph::NodeMap "GR::NodeMap<UM::Value>". 
    148148  */ 
    149149#ifdef DOXYGEN 
    150 template< typename _Digraph, 
    151           typename _LCapMap, 
    152           typename _UCapMap, 
    153           typename _DeltaMap, 
    154           typename _Traits > 
     150template< typename GR, 
     151          typename LM, 
     152          typename UM, 
     153          typename DM, 
     154          typename TR > 
    155155#else 
    156 template< typename _Digraph, 
    157           typename _LCapMap = typename _Digraph::template ArcMap<int>, 
    158           typename _UCapMap = _LCapMap, 
    159           typename _DeltaMap = typename _Digraph:: 
    160                                template NodeMap<typename _UCapMap::Value>, 
    161           typename _Traits=CirculationDefaultTraits<_Digraph, _LCapMap, 
    162                                                     _UCapMap, _DeltaMap> > 
     156template< typename GR, 
     157          typename LM = typename GR::template ArcMap<int>, 
     158          typename UM = LM, 
     159          typename DM = typename GR::template NodeMap<typename UM::Value>, 
     160          typename TR = CirculationDefaultTraits<GR, LM, UM, DM> > 
    163161#endif 
    164162  class Circulation { 
     
    166164 
    167165    ///The \ref CirculationDefaultTraits "traits class" of the algorithm. 
    168     typedef _Traits Traits; 
     166    typedef TR Traits; 
    169167    ///The type of the digraph the algorithm runs on. 
    170168    typedef typename Traits::Digraph Digraph; 
  • lemon/concepts/graph_components.h

    r463 r525  
    115115    /// 
    116116    /// This class provides the minimal set of features needed for a 
    117     /// directed graph structure. All digraph concepts have to be 
     117    /// directed graph structure. All digraph concepts have to 
    118118    /// conform to this base directed graph. It just provides types 
    119119    /// for nodes and arcs and functions to get the source and the 
     
    180180    /// This class provides the minimal set of features needed for an 
    181181    /// undirected graph structure. All undirected graph concepts have 
    182     /// to be conform to this base graph. It just provides types for 
     182    /// to conform to this base graph. It just provides types for 
    183183    /// nodes, arcs and edges and functions to get the 
    184184    /// source and the target of the arcs and edges, 
     
    295295    /// This class provides beside the core digraph features 
    296296    /// core id functions for the digraph structure. 
    297     /// The most of the base digraphs should be conform to this concept. 
     297    /// The most of the base digraphs should conform to this concept. 
    298298    /// The id's are unique and immutable. 
    299299    template <typename _Base = BaseDigraphComponent> 
     
    373373    /// This class provides beside the core undirected graph features 
    374374    /// core id functions for the undirected graph structure.  The 
    375     /// most of the base undirected graphs should be conform to this 
     375    /// most of the base undirected graphs should conform to this 
    376376    /// concept.  The id's are unique and immutable. 
    377377    template <typename _Base = BaseGraphComponent> 
  • lemon/dfs.h

    r463 r525  
    5050    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    5151    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap; 
    52     ///Instantiates a PredMap. 
    53  
    54     ///This function instantiates a PredMap. 
     52    ///Instantiates a \c PredMap. 
     53 
     54    ///This function instantiates a \ref PredMap. 
    5555    ///\param g is the digraph, to which we would like to define the 
    56     ///PredMap. 
     56    ///\ref PredMap. 
    5757    static PredMap *createPredMap(const Digraph &g) 
    5858    { 
     
    6565    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    6666    typedef NullMap<typename Digraph::Node,bool> ProcessedMap; 
    67     ///Instantiates a ProcessedMap. 
    68  
    69     ///This function instantiates a ProcessedMap. 
     67    ///Instantiates a \c ProcessedMap. 
     68 
     69    ///This function instantiates a \ref ProcessedMap. 
    7070    ///\param g is the digraph, to which 
    71     ///we would like to define the ProcessedMap 
     71    ///we would like to define the \ref ProcessedMap. 
    7272#ifdef DOXYGEN 
    7373    static ProcessedMap *createProcessedMap(const Digraph &g) 
     
    8484    ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept. 
    8585    typedef typename Digraph::template NodeMap<bool> ReachedMap; 
    86     ///Instantiates a ReachedMap. 
    87  
    88     ///This function instantiates a ReachedMap. 
     86    ///Instantiates a \c ReachedMap. 
     87 
     88    ///This function instantiates a \ref ReachedMap. 
    8989    ///\param g is the digraph, to which 
    90     ///we would like to define the ReachedMap. 
     90    ///we would like to define the \ref ReachedMap. 
    9191    static ReachedMap *createReachedMap(const Digraph &g) 
    9292    { 
     
    9999    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    100100    typedef typename Digraph::template NodeMap<int> DistMap; 
    101     ///Instantiates a DistMap. 
    102  
    103     ///This function instantiates a DistMap. 
     101    ///Instantiates a \c DistMap. 
     102 
     103    ///This function instantiates a \ref DistMap. 
    104104    ///\param g is the digraph, to which we would like to define the 
    105     ///DistMap. 
     105    ///\ref DistMap. 
    106106    static DistMap *createDistMap(const Digraph &g) 
    107107    { 
     
    221221    }; 
    222222    ///\brief \ref named-templ-param "Named parameter" for setting 
    223     ///PredMap type. 
     223    ///\c PredMap type. 
    224224    /// 
    225225    ///\ref named-templ-param "Named parameter" for setting 
    226     ///PredMap type. 
     226    ///\c PredMap type. 
    227227    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    228228    template <class T> 
     
    241241    }; 
    242242    ///\brief \ref named-templ-param "Named parameter" for setting 
    243     ///DistMap type. 
     243    ///\c DistMap type. 
    244244    /// 
    245245    ///\ref named-templ-param "Named parameter" for setting 
    246     ///DistMap type. 
     246    ///\c DistMap type. 
    247247    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    248248    template <class T> 
     
    261261    }; 
    262262    ///\brief \ref named-templ-param "Named parameter" for setting 
    263     ///ReachedMap type. 
     263    ///\c ReachedMap type. 
    264264    /// 
    265265    ///\ref named-templ-param "Named parameter" for setting 
    266     ///ReachedMap type. 
     266    ///\c ReachedMap type. 
    267267    ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept. 
    268268    template <class T> 
     
    281281    }; 
    282282    ///\brief \ref named-templ-param "Named parameter" for setting 
    283     ///ProcessedMap type. 
     283    ///\c ProcessedMap type. 
    284284    /// 
    285285    ///\ref named-templ-param "Named parameter" for setting 
    286     ///ProcessedMap type. 
     286    ///\c ProcessedMap type. 
    287287    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    288288    template <class T> 
     
    299299    }; 
    300300    ///\brief \ref named-templ-param "Named parameter" for setting 
    301     ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. 
     301    ///\c ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. 
    302302    /// 
    303303    ///\ref named-templ-param "Named parameter" for setting 
    304     ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. 
     304    ///\c ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. 
    305305    ///If you don't set it explicitly, it will be automatically allocated. 
    306306    struct SetStandardProcessedMap : 
     
    11271127  /// This class defines the interface of the DfsVisit events, and 
    11281128  /// it could be the base of a real visitor class. 
    1129   template <typename _Digraph> 
     1129  template <typename GR> 
    11301130  struct DfsVisitor { 
    1131     typedef _Digraph Digraph; 
     1131    typedef GR Digraph; 
    11321132    typedef typename Digraph::Arc Arc; 
    11331133    typedef typename Digraph::Node Node; 
     
    11651165  }; 
    11661166#else 
    1167   template <typename _Digraph> 
     1167  template <typename GR> 
    11681168  struct DfsVisitor { 
    1169     typedef _Digraph Digraph; 
     1169    typedef GR Digraph; 
    11701170    typedef typename Digraph::Arc Arc; 
    11711171    typedef typename Digraph::Node Node; 
     
    12001200  /// Default traits class of DfsVisit class. 
    12011201  /// \tparam _Digraph The type of the digraph the algorithm runs on. 
    1202   template<class _Digraph> 
     1202  template<class GR> 
    12031203  struct DfsVisitDefaultTraits { 
    12041204 
    12051205    /// \brief The type of the digraph the algorithm runs on. 
    1206     typedef _Digraph Digraph; 
     1206    typedef GR Digraph; 
    12071207 
    12081208    /// \brief The type of the map that indicates which nodes are reached. 
     
    12251225  /// \ingroup search 
    12261226  /// 
    1227   /// \brief %DFS algorithm class with visitor interface. 
     1227  /// \brief DFS algorithm class with visitor interface. 
    12281228  /// 
    1229   /// This class provides an efficient implementation of the %DFS algorithm 
     1229  /// This class provides an efficient implementation of the DFS algorithm 
    12301230  /// with visitor interface. 
    12311231  /// 
    1232   /// The %DfsVisit class provides an alternative interface to the Dfs 
     1232  /// The DfsVisit class provides an alternative interface to the Dfs 
    12331233  /// class. It works with callback mechanism, the DfsVisit object calls 
    12341234  /// the member functions of the \c Visitor class on every DFS event. 
     
    12391239  /// instead. 
    12401240  /// 
    1241   /// \tparam _Digraph The type of the digraph the algorithm runs on. 
    1242   /// The default value is 
    1243   /// \ref ListDigraph. The value of _Digraph is not used directly by 
    1244   /// \ref DfsVisit, it is only passed to \ref DfsVisitDefaultTraits. 
    1245   /// \tparam _Visitor The Visitor type that is used by the algorithm. 
    1246   /// \ref DfsVisitor "DfsVisitor<_Digraph>" is an empty visitor, which 
     1241  /// \tparam GR The type of the digraph the algorithm runs on. 
     1242  /// The default type is \ref ListDigraph. 
     1243  /// The value of GR is not used directly by \ref DfsVisit, 
     1244  /// it is only passed to \ref DfsVisitDefaultTraits. 
     1245  /// \tparam VS The Visitor type that is used by the algorithm. 
     1246  /// \ref DfsVisitor "DfsVisitor<GR>" is an empty visitor, which 
    12471247  /// does not observe the DFS events. If you want to observe the DFS 
    12481248  /// events, you should implement your own visitor class. 
    1249   /// \tparam _Traits Traits class to set various data types used by the 
     1249  /// \tparam TR Traits class to set various data types used by the 
    12501250  /// algorithm. The default traits class is 
    1251   /// \ref DfsVisitDefaultTraits "DfsVisitDefaultTraits<_Digraph>". 
     1251  /// \ref DfsVisitDefaultTraits "DfsVisitDefaultTraits<GR>". 
    12521252  /// See \ref DfsVisitDefaultTraits for the documentation of 
    12531253  /// a DFS visit traits class. 
    12541254#ifdef DOXYGEN 
    1255   template <typename _Digraph, typename _Visitor, typename _Traits> 
     1255  template <typename GR, typename VS, typename TR> 
    12561256#else 
    1257   template <typename _Digraph = ListDigraph, 
    1258             typename _Visitor = DfsVisitor<_Digraph>, 
    1259             typename _Traits = DfsVisitDefaultTraits<_Digraph> > 
     1257  template <typename GR = ListDigraph, 
     1258            typename VS = DfsVisitor<GR>, 
     1259            typename TR = DfsVisitDefaultTraits<GR> > 
    12601260#endif 
    12611261  class DfsVisit { 
     
    12631263 
    12641264    ///The traits class. 
    1265     typedef _Traits Traits; 
     1265    typedef TR Traits; 
    12661266 
    12671267    ///The type of the digraph the algorithm runs on. 
     
    12691269 
    12701270    ///The visitor type used by the algorithm. 
    1271     typedef _Visitor Visitor; 
     1271    typedef VS Visitor; 
    12721272 
    12731273    ///The type of the map that indicates which nodes are reached. 
  • lemon/dijkstra.h

    r463 r525  
    7474    typedef typename LM::Value Value; 
    7575 
    76     /// Operation traits for Dijkstra algorithm. 
     76    /// Operation traits for %Dijkstra algorithm. 
    7777 
    7878    /// This class defines the operations that are used in the algorithm. 
     
    8585    /// Usually it is \c Digraph::NodeMap<int>. 
    8686    typedef typename Digraph::template NodeMap<int> HeapCrossRef; 
    87     ///Instantiates a \ref HeapCrossRef. 
     87    ///Instantiates a \c HeapCrossRef. 
    8888 
    8989    ///This function instantiates a \ref HeapCrossRef. 
     
    9595    } 
    9696 
    97     ///The heap type used by the Dijkstra algorithm. 
     97    ///The heap type used by the %Dijkstra algorithm. 
    9898 
    9999    ///The heap type used by the Dijkstra algorithm. 
     
    102102    ///\sa Dijkstra 
    103103    typedef BinHeap<typename LM::Value, HeapCrossRef, std::less<Value> > Heap; 
    104     ///Instantiates a \ref Heap. 
     104    ///Instantiates a \c Heap. 
    105105 
    106106    ///This function instantiates a \ref Heap. 
     
    117117    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    118118    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap; 
    119     ///Instantiates a PredMap. 
    120  
    121     ///This function instantiates a PredMap. 
     119    ///Instantiates a \c PredMap. 
     120 
     121    ///This function instantiates a \ref PredMap. 
    122122    ///\param g is the digraph, to which we would like to define the 
    123     ///PredMap. 
     123    ///\ref PredMap. 
    124124    static PredMap *createPredMap(const Digraph &g) 
    125125    { 
     
    133133    ///By default it is a NullMap. 
    134134    typedef NullMap<typename Digraph::Node,bool> ProcessedMap; 
    135     ///Instantiates a ProcessedMap. 
    136  
    137     ///This function instantiates a ProcessedMap. 
     135    ///Instantiates a \c ProcessedMap. 
     136 
     137    ///This function instantiates a \ref ProcessedMap. 
    138138    ///\param g is the digraph, to which 
    139     ///we would like to define the ProcessedMap 
     139    ///we would like to define the \ref ProcessedMap. 
    140140#ifdef DOXYGEN 
    141141    static ProcessedMap *createProcessedMap(const Digraph &g) 
     
    152152    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    153153    typedef typename Digraph::template NodeMap<typename LM::Value> DistMap; 
    154     ///Instantiates a DistMap. 
    155  
    156     ///This function instantiates a DistMap. 
     154    ///Instantiates a \c DistMap. 
     155 
     156    ///This function instantiates a \ref DistMap. 
    157157    ///\param g is the digraph, to which we would like to define 
    158     ///the DistMap 
     158    ///the \ref DistMap. 
    159159    static DistMap *createDistMap(const Digraph &g) 
    160160    { 
     
    217217    ///The heap type used by the algorithm. 
    218218    typedef typename TR::Heap Heap; 
    219     ///The operation traits class. 
     219    ///\brief The \ref DijkstraDefaultOperationTraits "operation traits class" 
     220    ///of the algorithm. 
    220221    typedef typename TR::OperationTraits OperationTraits; 
    221222 
     
    233234    const Digraph *G; 
    234235    //Pointer to the length map. 
    235     const LengthMap *length; 
     236    const LengthMap *_length; 
    236237    //Pointer to the map of predecessors arcs. 
    237238    PredMap *_pred; 
     
    298299    }; 
    299300    ///\brief \ref named-templ-param "Named parameter" for setting 
    300     ///PredMap type. 
     301    ///\c PredMap type. 
    301302    /// 
    302303    ///\ref named-templ-param "Named parameter" for setting 
    303     ///PredMap type. 
     304    ///\c PredMap type. 
    304305    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    305306    template <class T> 
     
    319320    }; 
    320321    ///\brief \ref named-templ-param "Named parameter" for setting 
    321     ///DistMap type. 
     322    ///\c DistMap type. 
    322323    /// 
    323324    ///\ref named-templ-param "Named parameter" for setting 
    324     ///DistMap type. 
     325    ///\c DistMap type. 
    325326    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    326327    template <class T> 
     
    340341    }; 
    341342    ///\brief \ref named-templ-param "Named parameter" for setting 
    342     ///ProcessedMap type. 
     343    ///\c ProcessedMap type. 
    343344    /// 
    344345    ///\ref named-templ-param "Named parameter" for setting 
    345     ///ProcessedMap type. 
     346    ///\c ProcessedMap type. 
    346347    ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 
    347348    template <class T> 
     
    359360    }; 
    360361    ///\brief \ref named-templ-param "Named parameter" for setting 
    361     ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. 
     362    ///\c ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. 
    362363    /// 
    363364    ///\ref named-templ-param "Named parameter" for setting 
    364     ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. 
     365    ///\c ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. 
    365366    ///If you don't set it explicitly, it will be automatically allocated. 
    366367    struct SetStandardProcessedMap 
     
    440441    /// 
    441442    ///\ref named-templ-param "Named parameter" for setting 
    442     ///\ref OperationTraits type. 
     443    ///\c OperationTraits type. 
    443444    template <class T> 
    444445    struct SetOperationTraits 
     
    459460 
    460461    ///Constructor. 
    461     ///\param _g The digraph the algorithm runs on. 
    462     ///\param _length The length map used by the algorithm. 
    463     Dijkstra(const Digraph& _g, const LengthMap& _length) : 
    464       G(&_g), length(&_length), 
     462    ///\param g The digraph the algorithm runs on. 
     463    ///\param length The length map used by the algorithm. 
     464    Dijkstra(const Digraph& g, const LengthMap& length) : 
     465      G(&g), _length(&length), 
    465466      _pred(NULL), local_pred(false), 
    466467      _dist(NULL), local_dist(false), 
     
    486487    Dijkstra &lengthMap(const LengthMap &m) 
    487488    { 
    488       length = &m; 
     489      _length = &m; 
    489490      return *this; 
    490491    } 
     
    639640        switch(_heap->state(w)) { 
    640641        case Heap::PRE_HEAP: 
    641           _heap->push(w,OperationTraits::plus(oldvalue, (*length)[e])); 
     642          _heap->push(w,OperationTraits::plus(oldvalue, (*_length)[e])); 
    642643          _pred->set(w,e); 
    643644          break; 
    644645        case Heap::IN_HEAP: 
    645646          { 
    646             Value newvalue = OperationTraits::plus(oldvalue, (*length)[e]); 
     647            Value newvalue = OperationTraits::plus(oldvalue, (*_length)[e]); 
    647648            if ( OperationTraits::less(newvalue, (*_heap)[w]) ) { 
    648649              _heap->decrease(w, newvalue); 
  • lemon/preflow.h

    r463 r525  
    3232  /// 
    3333  /// Default traits class of Preflow class. 
    34   /// \tparam _Digraph Digraph type. 
    35   /// \tparam _CapacityMap Capacity map type. 
    36   template <typename _Digraph, typename _CapacityMap> 
     34  /// \tparam GR Digraph type. 
     35  /// \tparam CM Capacity map type. 
     36  template <typename GR, typename CM> 
    3737  struct PreflowDefaultTraits { 
    3838 
    3939    /// \brief The type of the digraph the algorithm runs on. 
    40     typedef _Digraph Digraph; 
     40    typedef GR Digraph; 
    4141 
    4242    /// \brief The type of the map that stores the arc capacities. 
     
    4444    /// The type of the map that stores the arc capacities. 
    4545    /// It must meet the \ref concepts::ReadMap "ReadMap" concept. 
    46     typedef _CapacityMap CapacityMap; 
     46    typedef CM CapacityMap; 
    4747 
    4848    /// \brief The type of the flow values. 
     
    105105  /// second phase constructs a feasible maximum flow on each arc. 
    106106  /// 
    107   /// \tparam _Digraph The type of the digraph the algorithm runs on. 
    108   /// \tparam _CapacityMap The type of the capacity map. The default map 
    109   /// type is \ref concepts::Digraph::ArcMap "_Digraph::ArcMap<int>". 
     107  /// \tparam GR The type of the digraph the algorithm runs on. 
     108  /// \tparam CM The type of the capacity map. The default map 
     109  /// type is \ref concepts::Digraph::ArcMap "GR::ArcMap<int>". 
    110110#ifdef DOXYGEN 
    111   template <typename _Digraph, typename _CapacityMap, typename _Traits> 
     111  template <typename GR, typename CM, typename TR> 
    112112#else 
    113   template <typename _Digraph, 
    114             typename _CapacityMap = typename _Digraph::template ArcMap<int>, 
    115             typename _Traits = PreflowDefaultTraits<_Digraph, _CapacityMap> > 
     113  template <typename GR, 
     114            typename CM = typename GR::template ArcMap<int>, 
     115            typename TR = PreflowDefaultTraits<GR, CM> > 
    116116#endif 
    117117  class Preflow { 
     
    119119 
    120120    ///The \ref PreflowDefaultTraits "traits class" of the algorithm. 
    121     typedef _Traits Traits; 
     121    typedef TR Traits; 
    122122    ///The type of the digraph the algorithm runs on. 
    123123    typedef typename Traits::Digraph Digraph; 
Note: See TracChangeset for help on using the changeset viewer.