COIN-OR::LEMON - Graph Library

Ticket #304: 304-2-f85e505e7eba.patch

File 304-2-f85e505e7eba.patch, 40.2 KB (added by Peter Kovacs, 15 years ago)

Doc improvements (only for the main branch)

  • lemon/bfs.h

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1248726105 -7200
    # Node ID f85e505e7eba018b33680b807388a44cb51fb114
    # Parent  a4d00df8852e1f58f3d8b4339329337dae765162
    Small doc improvements (#304)
    
    diff --git a/lemon/bfs.h b/lemon/bfs.h
    a b  
    4747    ///
    4848    ///The type of the map that stores the predecessor
    4949    ///arcs of the shortest paths.
    50     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     50    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    5151    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
    5252    ///Instantiates a \c PredMap.
    5353
     
    6262    ///The type of the map that indicates which nodes are processed.
    6363
    6464    ///The type of the map that indicates which nodes are processed.
    65     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     65    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    6666    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
    6767    ///Instantiates a \c ProcessedMap.
    6868
     
    8181    ///The type of the map that indicates which nodes are reached.
    8282
    8383    ///The type of the map that indicates which nodes are reached.
    84     ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     84    ///It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    8585    typedef typename Digraph::template NodeMap<bool> ReachedMap;
    8686    ///Instantiates a \c ReachedMap.
    8787
     
    9696    ///The type of the map that stores the distances of the nodes.
    9797
    9898    ///The type of the map that stores the distances of the nodes.
    99     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     99    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    100100    typedef typename Digraph::template NodeMap<int> DistMap;
    101101    ///Instantiates a \c DistMap.
    102102
     
    225225    ///
    226226    ///\ref named-templ-param "Named parameter" for setting
    227227    ///\c PredMap type.
    228     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     228    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    229229    template <class T>
    230230    struct SetPredMap : public Bfs< Digraph, SetPredMapTraits<T> > {
    231231      typedef Bfs< Digraph, SetPredMapTraits<T> > Create;
     
    245245    ///
    246246    ///\ref named-templ-param "Named parameter" for setting
    247247    ///\c DistMap type.
    248     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     248    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    249249    template <class T>
    250250    struct SetDistMap : public Bfs< Digraph, SetDistMapTraits<T> > {
    251251      typedef Bfs< Digraph, SetDistMapTraits<T> > Create;
     
    265265    ///
    266266    ///\ref named-templ-param "Named parameter" for setting
    267267    ///\c ReachedMap type.
    268     ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     268    ///It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    269269    template <class T>
    270270    struct SetReachedMap : public Bfs< Digraph, SetReachedMapTraits<T> > {
    271271      typedef Bfs< Digraph, SetReachedMapTraits<T> > Create;
     
    285285    ///
    286286    ///\ref named-templ-param "Named parameter" for setting
    287287    ///\c ProcessedMap type.
    288     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     288    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    289289    template <class T>
    290290    struct SetProcessedMap : public Bfs< Digraph, SetProcessedMapTraits<T> > {
    291291      typedef Bfs< Digraph, SetProcessedMapTraits<T> > Create;
     
    737737
    738738    ///@{
    739739
    740     ///The shortest path to a node.
     740    ///The shortest path to the given node.
    741741
    742     ///Returns the shortest path to a node.
     742    ///Returns the shortest path to the given node from the root(s).
    743743    ///
    744744    ///\warning \c t should be reached from the root(s).
    745745    ///
     
    747747    ///must be called before using this function.
    748748    Path path(Node t) const { return Path(*G, *_pred, t); }
    749749
    750     ///The distance of a node from the root(s).
     750    ///The distance of the given node from the root(s).
    751751
    752     ///Returns the distance of a node from the root(s).
     752    ///Returns the distance of the given node from the root(s).
    753753    ///
    754754    ///\warning If node \c v is not reached from the root(s), then
    755755    ///the return value of this function is undefined.
     
    758758    ///must be called before using this function.
    759759    int dist(Node v) const { return (*_dist)[v]; }
    760760
    761     ///Returns the 'previous arc' of the shortest path tree for a node.
    762 
     761    ///\brief Returns the 'previous arc' of the shortest path tree for
     762    ///the given node.
     763    ///
    763764    ///This function returns the 'previous arc' of the shortest path
    764765    ///tree for the node \c v, i.e. it returns the last arc of a
    765766    ///shortest path from a root to \c v. It is \c INVALID if \c v
    766767    ///is not reached from the root(s) or if \c v is a root.
    767768    ///
    768769    ///The shortest path tree used here is equal to the shortest path
    769     ///tree used in \ref predNode().
     770    ///tree used in \ref predNode() and \ref predMap().
    770771    ///
    771772    ///\pre Either \ref run(Node) "run()" or \ref init()
    772773    ///must be called before using this function.
    773774    Arc predArc(Node v) const { return (*_pred)[v];}
    774775
    775     ///Returns the 'previous node' of the shortest path tree for a node.
    776 
     776    ///\brief Returns the 'previous node' of the shortest path tree for
     777    ///the given node.
     778    ///
    777779    ///This function returns the 'previous node' of the shortest path
    778780    ///tree for the node \c v, i.e. it returns the last but one node
    779     ///from a shortest path from a root to \c v. It is \c INVALID
     781    ///of a shortest path from a root to \c v. It is \c INVALID
    780782    ///if \c v is not reached from the root(s) or if \c v is a root.
    781783    ///
    782784    ///The shortest path tree used here is equal to the shortest path
    783     ///tree used in \ref predArc().
     785    ///tree used in \ref predArc() and \ref predMap().
    784786    ///
    785787    ///\pre Either \ref run(Node) "run()" or \ref init()
    786788    ///must be called before using this function.
     
    801803    ///predecessor arcs.
    802804    ///
    803805    ///Returns a const reference to the node map that stores the predecessor
    804     ///arcs, which form the shortest path tree.
     806    ///arcs, which form the shortest path tree (forest).
    805807    ///
    806808    ///\pre Either \ref run(Node) "run()" or \ref init()
    807809    ///must be called before using this function.
    808810    const PredMap &predMap() const { return *_pred;}
    809811
    810     ///Checks if a node is reached from the root(s).
     812    ///Checks if the given node is reached from the root(s).
    811813
    812814    ///Returns \c true if \c v is reached from the root(s).
    813815    ///
     
    833835    ///
    834836    ///The type of the map that stores the predecessor
    835837    ///arcs of the shortest paths.
    836     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     838    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    837839    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
    838840    ///Instantiates a PredMap.
    839841
     
    848850    ///The type of the map that indicates which nodes are processed.
    849851
    850852    ///The type of the map that indicates which nodes are processed.
    851     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     853    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    852854    ///By default it is a NullMap.
    853855    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
    854856    ///Instantiates a ProcessedMap.
     
    868870    ///The type of the map that indicates which nodes are reached.
    869871
    870872    ///The type of the map that indicates which nodes are reached.
    871     ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     873    ///It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    872874    typedef typename Digraph::template NodeMap<bool> ReachedMap;
    873875    ///Instantiates a ReachedMap.
    874876
     
    883885    ///The type of the map that stores the distances of the nodes.
    884886
    885887    ///The type of the map that stores the distances of the nodes.
    886     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     888    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    887889    typedef typename Digraph::template NodeMap<int> DistMap;
    888890    ///Instantiates a DistMap.
    889891
     
    898900    ///The type of the shortest paths.
    899901
    900902    ///The type of the shortest paths.
    901     ///It must meet the \ref concepts::Path "Path" concept.
     903    ///It must conform to the \ref concepts::Path "Path" concept.
    902904    typedef lemon::Path<Digraph> Path;
    903905  };
    904906
    905907  /// Default traits class used by BfsWizard
    906908
    907   /// To make it easier to use Bfs algorithm
    908   /// we have created a wizard class.
    909   /// This \ref BfsWizard class needs default traits,
    910   /// as well as the \ref Bfs class.
    911   /// The \ref BfsWizardBase is a class to be the default traits of the
    912   /// \ref BfsWizard class.
     909  /// Default traits class used by BfsWizard.
     910  /// \tparam GR The type of the digraph.
    913911  template<class GR>
    914912  class BfsWizardBase : public BfsWizardDefaultTraits<GR>
    915913  {
     
    937935    public:
    938936    /// Constructor.
    939937
    940     /// This constructor does not require parameters, therefore it initiates
     938    /// This constructor does not require parameters, it initiates
    941939    /// all of the attributes to \c 0.
    942940    BfsWizardBase() : _g(0), _reached(0), _processed(0), _pred(0),
    943941                      _dist(0), _path(0), _di(0) {}
     
    967965  {
    968966    typedef TR Base;
    969967
    970     ///The type of the digraph the algorithm runs on.
    971968    typedef typename TR::Digraph Digraph;
    972969
    973970    typedef typename Digraph::Node Node;
     
    975972    typedef typename Digraph::Arc Arc;
    976973    typedef typename Digraph::OutArcIt OutArcIt;
    977974
    978     ///\brief The type of the map that stores the predecessor
    979     ///arcs of the shortest paths.
    980975    typedef typename TR::PredMap PredMap;
    981     ///\brief The type of the map that stores the distances of the nodes.
    982976    typedef typename TR::DistMap DistMap;
    983     ///\brief The type of the map that indicates which nodes are reached.
    984977    typedef typename TR::ReachedMap ReachedMap;
    985     ///\brief The type of the map that indicates which nodes are processed.
    986978    typedef typename TR::ProcessedMap ProcessedMap;
    987     ///The type of the shortest paths
    988979    typedef typename TR::Path Path;
    989980
    990981  public:
     
    10671058      static PredMap *createPredMap(const Digraph &) { return 0; };
    10681059      SetPredMapBase(const TR &b) : TR(b) {}
    10691060    };
    1070     ///\brief \ref named-func-param "Named parameter"
    1071     ///for setting PredMap object.
     1061
     1062    ///\brief \ref named-templ-param "Named parameter" for setting
     1063    ///the predecessor map.
    10721064    ///
    1073     ///\ref named-func-param "Named parameter"
    1074     ///for setting PredMap object.
     1065    ///\ref named-templ-param "Named parameter" function for setting
     1066    ///the map that stores the predecessor arcs of the nodes.
    10751067    template<class T>
    10761068    BfsWizard<SetPredMapBase<T> > predMap(const T &t)
    10771069    {
     
    10851077      static ReachedMap *createReachedMap(const Digraph &) { return 0; };
    10861078      SetReachedMapBase(const TR &b) : TR(b) {}
    10871079    };
    1088     ///\brief \ref named-func-param "Named parameter"
    1089     ///for setting ReachedMap object.
     1080
     1081    ///\brief \ref named-templ-param "Named parameter" for setting
     1082    ///the reached map.
    10901083    ///
    1091     /// \ref named-func-param "Named parameter"
    1092     ///for setting ReachedMap object.
     1084    ///\ref named-templ-param "Named parameter" function for setting
     1085    ///the map that indicates which nodes are reached.
    10931086    template<class T>
    10941087    BfsWizard<SetReachedMapBase<T> > reachedMap(const T &t)
    10951088    {
     
    11031096      static DistMap *createDistMap(const Digraph &) { return 0; };
    11041097      SetDistMapBase(const TR &b) : TR(b) {}
    11051098    };
    1106     ///\brief \ref named-func-param "Named parameter"
    1107     ///for setting DistMap object.
     1099
     1100    ///\brief \ref named-templ-param "Named parameter" for setting
     1101    ///the distance map.
    11081102    ///
    1109     /// \ref named-func-param "Named parameter"
    1110     ///for setting DistMap object.
     1103    ///\ref named-templ-param "Named parameter" function for setting
     1104    ///the map that stores the distances of the nodes calculated
     1105    ///by the algorithm.
    11111106    template<class T>
    11121107    BfsWizard<SetDistMapBase<T> > distMap(const T &t)
    11131108    {
     
    11211116      static ProcessedMap *createProcessedMap(const Digraph &) { return 0; };
    11221117      SetProcessedMapBase(const TR &b) : TR(b) {}
    11231118    };
    1124     ///\brief \ref named-func-param "Named parameter"
    1125     ///for setting ProcessedMap object.
     1119
     1120    ///\brief \ref named-func-param "Named parameter" for setting
     1121    ///the processed map.
    11261122    ///
    1127     /// \ref named-func-param "Named parameter"
    1128     ///for setting ProcessedMap object.
     1123    ///\ref named-templ-param "Named parameter" function for setting
     1124    ///the map that indicates which nodes are processed.
    11291125    template<class T>
    11301126    BfsWizard<SetProcessedMapBase<T> > processedMap(const T &t)
    11311127    {
     
    12641260    /// \brief The type of the map that indicates which nodes are reached.
    12651261    ///
    12661262    /// The type of the map that indicates which nodes are reached.
    1267     /// It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     1263    /// It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    12681264    typedef typename Digraph::template NodeMap<bool> ReachedMap;
    12691265
    12701266    /// \brief Instantiates a ReachedMap.
     
    17351731
    17361732    ///@{
    17371733
    1738     /// \brief Checks if a node is reached from the root(s).
     1734    /// \brief Checks if the given node is reached from the root(s).
    17391735    ///
    17401736    /// Returns \c true if \c v is reached from the root(s).
    17411737    ///
  • lemon/dfs.h

    diff --git a/lemon/dfs.h b/lemon/dfs.h
    a b  
    4747    ///
    4848    ///The type of the map that stores the predecessor
    4949    ///arcs of the %DFS paths.
    50     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     50    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    5151    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
    5252    ///Instantiates a \c PredMap.
    5353
     
    6262    ///The type of the map that indicates which nodes are processed.
    6363
    6464    ///The type of the map that indicates which nodes are processed.
    65     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     65    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    6666    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
    6767    ///Instantiates a \c ProcessedMap.
    6868
     
    8181    ///The type of the map that indicates which nodes are reached.
    8282
    8383    ///The type of the map that indicates which nodes are reached.
    84     ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     84    ///It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    8585    typedef typename Digraph::template NodeMap<bool> ReachedMap;
    8686    ///Instantiates a \c ReachedMap.
    8787
     
    9696    ///The type of the map that stores the distances of the nodes.
    9797
    9898    ///The type of the map that stores the distances of the nodes.
    99     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     99    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    100100    typedef typename Digraph::template NodeMap<int> DistMap;
    101101    ///Instantiates a \c DistMap.
    102102
     
    224224    ///
    225225    ///\ref named-templ-param "Named parameter" for setting
    226226    ///\c PredMap type.
    227     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     227    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    228228    template <class T>
    229229    struct SetPredMap : public Dfs<Digraph, SetPredMapTraits<T> > {
    230230      typedef Dfs<Digraph, SetPredMapTraits<T> > Create;
     
    244244    ///
    245245    ///\ref named-templ-param "Named parameter" for setting
    246246    ///\c DistMap type.
    247     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     247    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    248248    template <class T>
    249249    struct SetDistMap : public Dfs< Digraph, SetDistMapTraits<T> > {
    250250      typedef Dfs<Digraph, SetDistMapTraits<T> > Create;
     
    264264    ///
    265265    ///\ref named-templ-param "Named parameter" for setting
    266266    ///\c ReachedMap type.
    267     ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     267    ///It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    268268    template <class T>
    269269    struct SetReachedMap : public Dfs< Digraph, SetReachedMapTraits<T> > {
    270270      typedef Dfs< Digraph, SetReachedMapTraits<T> > Create;
     
    284284    ///
    285285    ///\ref named-templ-param "Named parameter" for setting
    286286    ///\c ProcessedMap type.
    287     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     287    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    288288    template <class T>
    289289    struct SetProcessedMap : public Dfs< Digraph, SetProcessedMapTraits<T> > {
    290290      typedef Dfs< Digraph, SetProcessedMapTraits<T> > Create;
     
    669669
    670670    ///@{
    671671
    672     ///The DFS path to a node.
     672    ///The DFS path to the given node.
    673673
    674     ///Returns the DFS path to a node.
     674    ///Returns the DFS path to the given node from the root(s).
    675675    ///
    676676    ///\warning \c t should be reached from the root(s).
    677677    ///
     
    679679    ///must be called before using this function.
    680680    Path path(Node t) const { return Path(*G, *_pred, t); }
    681681
    682     ///The distance of a node from the root(s).
     682    ///The distance of the given node from the root(s).
    683683
    684     ///Returns the distance of a node from the root(s).
     684    ///Returns the distance of the given node from the root(s).
    685685    ///
    686686    ///\warning If node \c v is not reached from the root(s), then
    687687    ///the return value of this function is undefined.
     
    690690    ///must be called before using this function.
    691691    int dist(Node v) const { return (*_dist)[v]; }
    692692
    693     ///Returns the 'previous arc' of the %DFS tree for a node.
     693    ///Returns the 'previous arc' of the %DFS tree for the given node.
    694694
    695695    ///This function returns the 'previous arc' of the %DFS tree for the
    696696    ///node \c v, i.e. it returns the last arc of a %DFS path from a
     
    698698    ///root(s) or if \c v is a root.
    699699    ///
    700700    ///The %DFS tree used here is equal to the %DFS tree used in
    701     ///\ref predNode().
     701    ///\ref predNode() and \ref predMap().
    702702    ///
    703703    ///\pre Either \ref run(Node) "run()" or \ref init()
    704704    ///must be called before using this function.
    705705    Arc predArc(Node v) const { return (*_pred)[v];}
    706706
    707     ///Returns the 'previous node' of the %DFS tree.
     707    ///Returns the 'previous node' of the %DFS tree for the given node.
    708708
    709709    ///This function returns the 'previous node' of the %DFS
    710710    ///tree for the node \c v, i.e. it returns the last but one node
    711     ///from a %DFS path from a root to \c v. It is \c INVALID
     711    ///of a %DFS path from a root to \c v. It is \c INVALID
    712712    ///if \c v is not reached from the root(s) or if \c v is a root.
    713713    ///
    714714    ///The %DFS tree used here is equal to the %DFS tree used in
    715     ///\ref predArc().
     715    ///\ref predArc() and \ref predMap().
    716716    ///
    717717    ///\pre Either \ref run(Node) "run()" or \ref init()
    718718    ///must be called before using this function.
     
    733733    ///predecessor arcs.
    734734    ///
    735735    ///Returns a const reference to the node map that stores the predecessor
    736     ///arcs, which form the DFS tree.
     736    ///arcs, which form the DFS tree (forest).
    737737    ///
    738738    ///\pre Either \ref run(Node) "run()" or \ref init()
    739739    ///must be called before using this function.
    740740    const PredMap &predMap() const { return *_pred;}
    741741
    742     ///Checks if a node is reached from the root(s).
     742    ///Checks if the given node. node is reached from the root(s).
    743743
    744744    ///Returns \c true if \c v is reached from the root(s).
    745745    ///
     
    765765    ///
    766766    ///The type of the map that stores the predecessor
    767767    ///arcs of the %DFS paths.
    768     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     768    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    769769    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
    770770    ///Instantiates a PredMap.
    771771
     
    780780    ///The type of the map that indicates which nodes are processed.
    781781
    782782    ///The type of the map that indicates which nodes are processed.
    783     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     783    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    784784    ///By default it is a NullMap.
    785785    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
    786786    ///Instantiates a ProcessedMap.
     
    800800    ///The type of the map that indicates which nodes are reached.
    801801
    802802    ///The type of the map that indicates which nodes are reached.
    803     ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     803    ///It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    804804    typedef typename Digraph::template NodeMap<bool> ReachedMap;
    805805    ///Instantiates a ReachedMap.
    806806
     
    815815    ///The type of the map that stores the distances of the nodes.
    816816
    817817    ///The type of the map that stores the distances of the nodes.
    818     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     818    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    819819    typedef typename Digraph::template NodeMap<int> DistMap;
    820820    ///Instantiates a DistMap.
    821821
     
    830830    ///The type of the DFS paths.
    831831
    832832    ///The type of the DFS paths.
    833     ///It must meet the \ref concepts::Path "Path" concept.
     833    ///It must conform to the \ref concepts::Path "Path" concept.
    834834    typedef lemon::Path<Digraph> Path;
    835835  };
    836836
    837837  /// Default traits class used by DfsWizard
    838838
    839   /// To make it easier to use Dfs algorithm
    840   /// we have created a wizard class.
    841   /// This \ref DfsWizard class needs default traits,
    842   /// as well as the \ref Dfs class.
    843   /// The \ref DfsWizardBase is a class to be the default traits of the
    844   /// \ref DfsWizard class.
     839  /// Default traits class used by DfsWizard.
     840  /// \tparam GR The type of the digraph.
    845841  template<class GR>
    846842  class DfsWizardBase : public DfsWizardDefaultTraits<GR>
    847843  {
     
    869865    public:
    870866    /// Constructor.
    871867
    872     /// This constructor does not require parameters, therefore it initiates
     868    /// This constructor does not require parameters, it initiates
    873869    /// all of the attributes to \c 0.
    874870    DfsWizardBase() : _g(0), _reached(0), _processed(0), _pred(0),
    875871                      _dist(0), _path(0), _di(0) {}
     
    899895  {
    900896    typedef TR Base;
    901897
    902     ///The type of the digraph the algorithm runs on.
    903898    typedef typename TR::Digraph Digraph;
    904899
    905900    typedef typename Digraph::Node Node;
     
    907902    typedef typename Digraph::Arc Arc;
    908903    typedef typename Digraph::OutArcIt OutArcIt;
    909904
    910     ///\brief The type of the map that stores the predecessor
    911     ///arcs of the DFS paths.
    912905    typedef typename TR::PredMap PredMap;
    913     ///\brief The type of the map that stores the distances of the nodes.
    914906    typedef typename TR::DistMap DistMap;
    915     ///\brief The type of the map that indicates which nodes are reached.
    916907    typedef typename TR::ReachedMap ReachedMap;
    917     ///\brief The type of the map that indicates which nodes are processed.
    918908    typedef typename TR::ProcessedMap ProcessedMap;
    919     ///The type of the DFS paths
    920909    typedef typename TR::Path Path;
    921910
    922911  public:
     
    999988      static PredMap *createPredMap(const Digraph &) { return 0; };
    1000989      SetPredMapBase(const TR &b) : TR(b) {}
    1001990    };
    1002     ///\brief \ref named-func-param "Named parameter"
    1003     ///for setting PredMap object.
     991
     992    ///\brief \ref named-templ-param "Named parameter" for setting
     993    ///the predecessor map.
    1004994    ///
    1005     ///\ref named-func-param "Named parameter"
    1006     ///for setting PredMap object.
     995    ///\ref named-templ-param "Named parameter" function for setting
     996    ///the map that stores the predecessor arcs of the nodes.
    1007997    template<class T>
    1008998    DfsWizard<SetPredMapBase<T> > predMap(const T &t)
    1009999    {
     
    10171007      static ReachedMap *createReachedMap(const Digraph &) { return 0; };
    10181008      SetReachedMapBase(const TR &b) : TR(b) {}
    10191009    };
    1020     ///\brief \ref named-func-param "Named parameter"
    1021     ///for setting ReachedMap object.
     1010
     1011    ///\brief \ref named-templ-param "Named parameter" for setting
     1012    ///the reached map.
    10221013    ///
    1023     /// \ref named-func-param "Named parameter"
    1024     ///for setting ReachedMap object.
     1014    ///\ref named-templ-param "Named parameter" function for setting
     1015    ///the map that indicates which nodes are reached.
    10251016    template<class T>
    10261017    DfsWizard<SetReachedMapBase<T> > reachedMap(const T &t)
    10271018    {
     
    10351026      static DistMap *createDistMap(const Digraph &) { return 0; };
    10361027      SetDistMapBase(const TR &b) : TR(b) {}
    10371028    };
    1038     ///\brief \ref named-func-param "Named parameter"
    1039     ///for setting DistMap object.
     1029
     1030    ///\brief \ref named-templ-param "Named parameter" for setting
     1031    ///the distance map.
    10401032    ///
    1041     /// \ref named-func-param "Named parameter"
    1042     ///for setting DistMap object.
     1033    ///\ref named-templ-param "Named parameter" function for setting
     1034    ///the map that stores the distances of the nodes calculated
     1035    ///by the algorithm.
    10431036    template<class T>
    10441037    DfsWizard<SetDistMapBase<T> > distMap(const T &t)
    10451038    {
     
    10531046      static ProcessedMap *createProcessedMap(const Digraph &) { return 0; };
    10541047      SetProcessedMapBase(const TR &b) : TR(b) {}
    10551048    };
    1056     ///\brief \ref named-func-param "Named parameter"
    1057     ///for setting ProcessedMap object.
     1049
     1050    ///\brief \ref named-func-param "Named parameter" for setting
     1051    ///the processed map.
    10581052    ///
    1059     /// \ref named-func-param "Named parameter"
    1060     ///for setting ProcessedMap object.
     1053    ///\ref named-templ-param "Named parameter" function for setting
     1054    ///the map that indicates which nodes are processed.
    10611055    template<class T>
    10621056    DfsWizard<SetProcessedMapBase<T> > processedMap(const T &t)
    10631057    {
     
    12081202    /// \brief The type of the map that indicates which nodes are reached.
    12091203    ///
    12101204    /// The type of the map that indicates which nodes are reached.
    1211     /// It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     1205    /// It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    12121206    typedef typename Digraph::template NodeMap<bool> ReachedMap;
    12131207
    12141208    /// \brief Instantiates a ReachedMap.
     
    16201614
    16211615    ///@{
    16221616
    1623     /// \brief Checks if a node is reached from the root(s).
     1617    /// \brief Checks if the given node is reached from the root(s).
    16241618    ///
    16251619    /// Returns \c true if \c v is reached from the root(s).
    16261620    ///
  • lemon/dijkstra.h

    diff --git a/lemon/dijkstra.h b/lemon/dijkstra.h
    a b  
    7070    ///The type of the map that stores the arc lengths.
    7171
    7272    ///The type of the map that stores the arc lengths.
    73     ///It must meet the \ref concepts::ReadMap "ReadMap" concept.
     73    ///It must conform to the \ref concepts::ReadMap "ReadMap" concept.
    7474    typedef LEN LengthMap;
    75     ///The type of the length of the arcs.
     75    ///The type of the arc lengths.
    7676    typedef typename LEN::Value Value;
    7777
    7878    /// Operation traits for %Dijkstra algorithm.
     
    116116    ///
    117117    ///The type of the map that stores the predecessor
    118118    ///arcs of the shortest paths.
    119     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     119    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    120120    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
    121121    ///Instantiates a \c PredMap.
    122122
     
    131131    ///The type of the map that indicates which nodes are processed.
    132132
    133133    ///The type of the map that indicates which nodes are processed.
    134     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     134    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    135135    ///By default it is a NullMap.
    136136    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
    137137    ///Instantiates a \c ProcessedMap.
     
    151151    ///The type of the map that stores the distances of the nodes.
    152152
    153153    ///The type of the map that stores the distances of the nodes.
    154     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     154    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    155155    typedef typename Digraph::template NodeMap<typename LEN::Value> DistMap;
    156156    ///Instantiates a \c DistMap.
    157157
     
    169169  /// \ingroup shortest_path
    170170  ///This class provides an efficient implementation of the %Dijkstra algorithm.
    171171  ///
     172  ///The %Dijkstra algorithm solves the single-source shortest path problem
     173  ///when all arc lengths are non-negative. If there are negative lengths,
     174  ///the BellmanFord algorithm should be used instead.
     175  ///
    172176  ///The arc lengths are passed to the algorithm using a
    173177  ///\ref concepts::ReadMap "ReadMap",
    174178  ///so it is easy to change it to any kind of length.
     
    201205    ///The type of the digraph the algorithm runs on.
    202206    typedef typename TR::Digraph Digraph;
    203207
    204     ///The type of the length of the arcs.
     208    ///The type of the arc lengths.
    205209    typedef typename TR::LengthMap::Value Value;
    206210    ///The type of the map that stores the arc lengths.
    207211    typedef typename TR::LengthMap LengthMap;
     
    304308    ///
    305309    ///\ref named-templ-param "Named parameter" for setting
    306310    ///\c PredMap type.
    307     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     311    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    308312    template <class T>
    309313    struct SetPredMap
    310314      : public Dijkstra< Digraph, LengthMap, SetPredMapTraits<T> > {
     
    325329    ///
    326330    ///\ref named-templ-param "Named parameter" for setting
    327331    ///\c DistMap type.
    328     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     332    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    329333    template <class T>
    330334    struct SetDistMap
    331335      : public Dijkstra< Digraph, LengthMap, SetDistMapTraits<T> > {
     
    346350    ///
    347351    ///\ref named-templ-param "Named parameter" for setting
    348352    ///\c ProcessedMap type.
    349     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     353    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    350354    template <class T>
    351355    struct SetProcessedMap
    352356      : public Dijkstra< Digraph, LengthMap, SetProcessedMapTraits<T> > {
     
    443447    ///
    444448    ///\ref named-templ-param "Named parameter" for setting
    445449    ///\c OperationTraits type.
     450    /// For more information see \ref DijkstraDefaultOperationTraits.
    446451    template <class T>
    447452    struct SetOperationTraits
    448453      : public Dijkstra<Digraph, LengthMap, SetOperationTraitsTraits<T> > {
     
    801806    ///\name Query Functions
    802807    ///The results of the %Dijkstra algorithm can be obtained using these
    803808    ///functions.\n
    804     ///Either \ref run(Node) "run()" or \ref start() should be called
     809    ///Either \ref run(Node) "run()" or \ref init() should be called
    805810    ///before using them.
    806811
    807812    ///@{
    808813
    809     ///The shortest path to a node.
     814    ///The shortest path to the given node.
    810815
    811     ///Returns the shortest path to a node.
     816    ///Returns the shortest path to the given node from the root(s).
    812817    ///
    813818    ///\warning \c t should be reached from the root(s).
    814819    ///
     
    816821    ///must be called before using this function.
    817822    Path path(Node t) const { return Path(*G, *_pred, t); }
    818823
    819     ///The distance of a node from the root(s).
     824    ///The distance of the given node from the root(s).
    820825
    821     ///Returns the distance of a node from the root(s).
     826    ///Returns the distance of the given node from the root(s).
    822827    ///
    823828    ///\warning If node \c v is not reached from the root(s), then
    824829    ///the return value of this function is undefined.
     
    827832    ///must be called before using this function.
    828833    Value dist(Node v) const { return (*_dist)[v]; }
    829834
    830     ///Returns the 'previous arc' of the shortest path tree for a node.
    831 
     835    ///\brief Returns the 'previous arc' of the shortest path tree for
     836    ///the given node.
     837    ///
    832838    ///This function returns the 'previous arc' of the shortest path
    833839    ///tree for the node \c v, i.e. it returns the last arc of a
    834840    ///shortest path from a root to \c v. It is \c INVALID if \c v
    835841    ///is not reached from the root(s) or if \c v is a root.
    836842    ///
    837843    ///The shortest path tree used here is equal to the shortest path
    838     ///tree used in \ref predNode().
     844    ///tree used in \ref predNode() and \ref predMap().
    839845    ///
    840846    ///\pre Either \ref run(Node) "run()" or \ref init()
    841847    ///must be called before using this function.
    842848    Arc predArc(Node v) const { return (*_pred)[v]; }
    843849
    844     ///Returns the 'previous node' of the shortest path tree for a node.
    845 
     850    ///\brief Returns the 'previous node' of the shortest path tree for
     851    ///the given node.
     852    ///
    846853    ///This function returns the 'previous node' of the shortest path
    847854    ///tree for the node \c v, i.e. it returns the last but one node
    848     ///from a shortest path from a root to \c v. It is \c INVALID
     855    ///of a shortest path from a root to \c v. It is \c INVALID
    849856    ///if \c v is not reached from the root(s) or if \c v is a root.
    850857    ///
    851858    ///The shortest path tree used here is equal to the shortest path
    852     ///tree used in \ref predArc().
     859    ///tree used in \ref predArc() and \ref predMap().
    853860    ///
    854861    ///\pre Either \ref run(Node) "run()" or \ref init()
    855862    ///must be called before using this function.
     
    870877    ///predecessor arcs.
    871878    ///
    872879    ///Returns a const reference to the node map that stores the predecessor
    873     ///arcs, which form the shortest path tree.
     880    ///arcs, which form the shortest path tree (forest).
    874881    ///
    875882    ///\pre Either \ref run(Node) "run()" or \ref init()
    876883    ///must be called before using this function.
    877884    const PredMap &predMap() const { return *_pred;}
    878885
    879     ///Checks if a node is reached from the root(s).
     886    ///Checks if the given node is reached from the root(s).
    880887
    881888    ///Returns \c true if \c v is reached from the root(s).
    882889    ///
     
    895902    bool processed(Node v) const { return (*_heap_cross_ref)[v] ==
    896903                                          Heap::POST_HEAP; }
    897904
    898     ///The current distance of a node from the root(s).
     905    ///The current distance of the given node from the root(s).
    899906
    900     ///Returns the current distance of a node from the root(s).
     907    ///Returns the current distance of the given node from the root(s).
    901908    ///It may be decreased in the following processes.
    902909    ///
    903910    ///\pre Either \ref run(Node) "run()" or \ref init()
     
    924931    ///The type of the map that stores the arc lengths.
    925932
    926933    ///The type of the map that stores the arc lengths.
    927     ///It must meet the \ref concepts::ReadMap "ReadMap" concept.
     934    ///It must conform to the \ref concepts::ReadMap "ReadMap" concept.
    928935    typedef LEN LengthMap;
    929     ///The type of the length of the arcs.
     936    ///The type of the arc lengths.
    930937    typedef typename LEN::Value Value;
    931938
    932939    /// Operation traits for Dijkstra algorithm.
     
    973980    ///
    974981    ///The type of the map that stores the predecessor
    975982    ///arcs of the shortest paths.
    976     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     983    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    977984    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
    978985    ///Instantiates a PredMap.
    979986
     
    988995    ///The type of the map that indicates which nodes are processed.
    989996
    990997    ///The type of the map that indicates which nodes are processed.
    991     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     998    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    992999    ///By default it is a NullMap.
    9931000    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
    9941001    ///Instantiates a ProcessedMap.
     
    10081015    ///The type of the map that stores the distances of the nodes.
    10091016
    10101017    ///The type of the map that stores the distances of the nodes.
    1011     ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
     1018    ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    10121019    typedef typename Digraph::template NodeMap<typename LEN::Value> DistMap;
    10131020    ///Instantiates a DistMap.
    10141021
     
    10231030    ///The type of the shortest paths.
    10241031
    10251032    ///The type of the shortest paths.
    1026     ///It must meet the \ref concepts::Path "Path" concept.
     1033    ///It must conform to the \ref concepts::Path "Path" concept.
    10271034    typedef lemon::Path<Digraph> Path;
    10281035  };
    10291036
    10301037  /// Default traits class used by DijkstraWizard
    10311038
    1032   /// To make it easier to use Dijkstra algorithm
    1033   /// we have created a wizard class.
    1034   /// This \ref DijkstraWizard class needs default traits,
    1035   /// as well as the \ref Dijkstra class.
    1036   /// The \ref DijkstraWizardBase is a class to be the default traits of the
    1037   /// \ref DijkstraWizard class.
     1039  /// Default traits class used by DijkstraWizard.
     1040  /// \tparam GR The type of the digraph.
     1041  /// \tparam LEN The type of the length map.
    10381042  template<typename GR, typename LEN>
    10391043  class DijkstraWizardBase : public DijkstraWizardDefaultTraits<GR,LEN>
    10401044  {
     
    10931097  {
    10941098    typedef TR Base;
    10951099
    1096     ///The type of the digraph the algorithm runs on.
    10971100    typedef typename TR::Digraph Digraph;
    10981101
    10991102    typedef typename Digraph::Node Node;
     
    11011104    typedef typename Digraph::Arc Arc;
    11021105    typedef typename Digraph::OutArcIt OutArcIt;
    11031106
    1104     ///The type of the map that stores the arc lengths.
    11051107    typedef typename TR::LengthMap LengthMap;
    1106     ///The type of the length of the arcs.
    11071108    typedef typename LengthMap::Value Value;
    1108     ///\brief The type of the map that stores the predecessor
    1109     ///arcs of the shortest paths.
    11101109    typedef typename TR::PredMap PredMap;
    1111     ///The type of the map that stores the distances of the nodes.
    11121110    typedef typename TR::DistMap DistMap;
    1113     ///The type of the map that indicates which nodes are processed.
    11141111    typedef typename TR::ProcessedMap ProcessedMap;
    1115     ///The type of the shortest paths
    11161112    typedef typename TR::Path Path;
    1117     ///The heap type used by the dijkstra algorithm.
    11181113    typedef typename TR::Heap Heap;
    11191114
    11201115  public:
     
    11861181      static PredMap *createPredMap(const Digraph &) { return 0; };
    11871182      SetPredMapBase(const TR &b) : TR(b) {}
    11881183    };
    1189     ///\brief \ref named-func-param "Named parameter"
    1190     ///for setting PredMap object.
     1184
     1185    ///\brief \ref named-templ-param "Named parameter" for setting
     1186    ///the predecessor map.
    11911187    ///
    1192     ///\ref named-func-param "Named parameter"
    1193     ///for setting PredMap object.
     1188    ///\ref named-templ-param "Named parameter" function for setting
     1189    ///the map that stores the predecessor arcs of the nodes.
    11941190    template<class T>
    11951191    DijkstraWizard<SetPredMapBase<T> > predMap(const T &t)
    11961192    {
     
    12041200      static DistMap *createDistMap(const Digraph &) { return 0; };
    12051201      SetDistMapBase(const TR &b) : TR(b) {}
    12061202    };
    1207     ///\brief \ref named-func-param "Named parameter"
    1208     ///for setting DistMap object.
     1203
     1204    ///\brief \ref named-templ-param "Named parameter" for setting
     1205    ///the distance map.
    12091206    ///
    1210     ///\ref named-func-param "Named parameter"
    1211     ///for setting DistMap object.
     1207    ///\ref named-templ-param "Named parameter" function for setting
     1208    ///the map that stores the distances of the nodes calculated
     1209    ///by the algorithm.
    12121210    template<class T>
    12131211    DijkstraWizard<SetDistMapBase<T> > distMap(const T &t)
    12141212    {
     
    12221220      static ProcessedMap *createProcessedMap(const Digraph &) { return 0; };
    12231221      SetProcessedMapBase(const TR &b) : TR(b) {}
    12241222    };
    1225     ///\brief \ref named-func-param "Named parameter"
    1226     ///for setting ProcessedMap object.
     1223
     1224    ///\brief \ref named-func-param "Named parameter" for setting
     1225    ///the processed map.
    12271226    ///
    1228     /// \ref named-func-param "Named parameter"
    1229     ///for setting ProcessedMap object.
     1227    ///\ref named-templ-param "Named parameter" function for setting
     1228    ///the map that indicates which nodes are processed.
    12301229    template<class T>
    12311230    DijkstraWizard<SetProcessedMapBase<T> > processedMap(const T &t)
    12321231    {
     
    12391238      typedef T Path;
    12401239      SetPathBase(const TR &b) : TR(b) {}
    12411240    };
     1241
    12421242    ///\brief \ref named-func-param "Named parameter"
    12431243    ///for getting the shortest path to the target node.
    12441244    ///