COIN-OR::LEMON - Graph Library

Changes in / [717:684964884a2e:715:ece80147fb08] in lemon-main


Ignore:
Location:
lemon
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • lemon/bfs.h

    r717 r713  
    4848    ///The type of the map that stores the predecessor
    4949    ///arcs of the shortest paths.
    50     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     50    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    5151    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
    5252    ///Instantiates a \c PredMap.
     
    6363
    6464    ///The type of the map that indicates which nodes are processed.
    65     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    66     ///By default it is a NullMap.
     65    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    6766    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
    6867    ///Instantiates a \c ProcessedMap.
     
    8382
    8483    ///The type of the map that indicates which nodes are reached.
    85     ///It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     84    ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    8685    typedef typename Digraph::template NodeMap<bool> ReachedMap;
    8786    ///Instantiates a \c ReachedMap.
     
    9897
    9998    ///The type of the map that stores the distances of the nodes.
    100     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     99    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    101100    typedef typename Digraph::template NodeMap<int> DistMap;
    102101    ///Instantiates a \c DistMap.
     
    227226    ///\ref named-templ-param "Named parameter" for setting
    228227    ///\c PredMap type.
    229     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     228    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    230229    template <class T>
    231230    struct SetPredMap : public Bfs< Digraph, SetPredMapTraits<T> > {
     
    247246    ///\ref named-templ-param "Named parameter" for setting
    248247    ///\c DistMap type.
    249     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     248    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    250249    template <class T>
    251250    struct SetDistMap : public Bfs< Digraph, SetDistMapTraits<T> > {
     
    267266    ///\ref named-templ-param "Named parameter" for setting
    268267    ///\c ReachedMap type.
    269     ///It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     268    ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    270269    template <class T>
    271270    struct SetReachedMap : public Bfs< Digraph, SetReachedMapTraits<T> > {
     
    287286    ///\ref named-templ-param "Named parameter" for setting
    288287    ///\c ProcessedMap type.
    289     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     288    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    290289    template <class T>
    291290    struct SetProcessedMap : public Bfs< Digraph, SetProcessedMapTraits<T> > {
     
    739738    ///@{
    740739
    741     ///The shortest path to the given node.
    742 
    743     ///Returns the shortest path to the given node from the root(s).
     740    ///The shortest path to a node.
     741
     742    ///Returns the shortest path to a node.
    744743    ///
    745744    ///\warning \c t should be reached from the root(s).
     
    749748    Path path(Node t) const { return Path(*G, *_pred, t); }
    750749
    751     ///The distance of the given node from the root(s).
    752 
    753     ///Returns the distance of the given node from the root(s).
     750    ///The distance of a node from the root(s).
     751
     752    ///Returns the distance of a node from the root(s).
    754753    ///
    755754    ///\warning If node \c v is not reached from the root(s), then
     
    760759    int dist(Node v) const { return (*_dist)[v]; }
    761760
    762     ///\brief Returns the 'previous arc' of the shortest path tree for
    763     ///the given node.
    764     ///
     761    ///Returns the 'previous arc' of the shortest path tree for a node.
     762
    765763    ///This function returns the 'previous arc' of the shortest path
    766764    ///tree for the node \c v, i.e. it returns the last arc of a
     
    769767    ///
    770768    ///The shortest path tree used here is equal to the shortest path
    771     ///tree used in \ref predNode() and \ref predMap().
     769    ///tree used in \ref predNode().
    772770    ///
    773771    ///\pre Either \ref run(Node) "run()" or \ref init()
     
    775773    Arc predArc(Node v) const { return (*_pred)[v];}
    776774
    777     ///\brief Returns the 'previous node' of the shortest path tree for
    778     ///the given node.
    779     ///
     775    ///Returns the 'previous node' of the shortest path tree for a node.
     776
    780777    ///This function returns the 'previous node' of the shortest path
    781778    ///tree for the node \c v, i.e. it returns the last but one node
    782     ///of a shortest path from a root to \c v. It is \c INVALID
     779    ///from a shortest path from a root to \c v. It is \c INVALID
    783780    ///if \c v is not reached from the root(s) or if \c v is a root.
    784781    ///
    785782    ///The shortest path tree used here is equal to the shortest path
    786     ///tree used in \ref predArc() and \ref predMap().
     783    ///tree used in \ref predArc().
    787784    ///
    788785    ///\pre Either \ref run(Node) "run()" or \ref init()
     
    805802    ///
    806803    ///Returns a const reference to the node map that stores the predecessor
    807     ///arcs, which form the shortest path tree (forest).
     804    ///arcs, which form the shortest path tree.
    808805    ///
    809806    ///\pre Either \ref run(Node) "run()" or \ref init()
     
    811808    const PredMap &predMap() const { return *_pred;}
    812809
    813     ///Checks if the given node is reached from the root(s).
     810    ///Checks if a node is reached from the root(s).
    814811
    815812    ///Returns \c true if \c v is reached from the root(s).
     
    837834    ///The type of the map that stores the predecessor
    838835    ///arcs of the shortest paths.
    839     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     836    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    840837    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
    841838    ///Instantiates a PredMap.
     
    852849
    853850    ///The type of the map that indicates which nodes are processed.
    854     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     851    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    855852    ///By default it is a NullMap.
    856853    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
     
    872869
    873870    ///The type of the map that indicates which nodes are reached.
    874     ///It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     871    ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    875872    typedef typename Digraph::template NodeMap<bool> ReachedMap;
    876873    ///Instantiates a ReachedMap.
     
    887884
    888885    ///The type of the map that stores the distances of the nodes.
    889     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     886    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    890887    typedef typename Digraph::template NodeMap<int> DistMap;
    891888    ///Instantiates a DistMap.
     
    902899
    903900    ///The type of the shortest paths.
    904     ///It must conform to the \ref concepts::Path "Path" concept.
     901    ///It must meet the \ref concepts::Path "Path" concept.
    905902    typedef lemon::Path<Digraph> Path;
    906903  };
     
    908905  /// Default traits class used by BfsWizard
    909906
    910   /// Default traits class used by BfsWizard.
    911   /// \tparam GR The type of the digraph.
     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.
    912913  template<class GR>
    913914  class BfsWizardBase : public BfsWizardDefaultTraits<GR>
     
    937938    /// Constructor.
    938939
    939     /// This constructor does not require parameters, it initiates
     940    /// This constructor does not require parameters, therefore it initiates
    940941    /// all of the attributes to \c 0.
    941942    BfsWizardBase() : _g(0), _reached(0), _processed(0), _pred(0),
     
    967968    typedef TR Base;
    968969
     970    ///The type of the digraph the algorithm runs on.
    969971    typedef typename TR::Digraph Digraph;
    970972
     
    974976    typedef typename Digraph::OutArcIt OutArcIt;
    975977
     978    ///\brief The type of the map that stores the predecessor
     979    ///arcs of the shortest paths.
    976980    typedef typename TR::PredMap PredMap;
     981    ///\brief The type of the map that stores the distances of the nodes.
    977982    typedef typename TR::DistMap DistMap;
     983    ///\brief The type of the map that indicates which nodes are reached.
    978984    typedef typename TR::ReachedMap ReachedMap;
     985    ///\brief The type of the map that indicates which nodes are processed.
    979986    typedef typename TR::ProcessedMap ProcessedMap;
     987    ///The type of the shortest paths
    980988    typedef typename TR::Path Path;
    981989
     
    10601068      SetPredMapBase(const TR &b) : TR(b) {}
    10611069    };
    1062 
    1063     ///\brief \ref named-templ-param "Named parameter" for setting
    1064     ///the predecessor map.
    1065     ///
    1066     ///\ref named-templ-param "Named parameter" function for setting
    1067     ///the map that stores the predecessor arcs of the nodes.
     1070    ///\brief \ref named-func-param "Named parameter"
     1071    ///for setting PredMap object.
     1072    ///
     1073    ///\ref named-func-param "Named parameter"
     1074    ///for setting PredMap object.
    10681075    template<class T>
    10691076    BfsWizard<SetPredMapBase<T> > predMap(const T &t)
     
    10791086      SetReachedMapBase(const TR &b) : TR(b) {}
    10801087    };
    1081 
    1082     ///\brief \ref named-templ-param "Named parameter" for setting
    1083     ///the reached map.
    1084     ///
    1085     ///\ref named-templ-param "Named parameter" function for setting
    1086     ///the map that indicates which nodes are reached.
     1088    ///\brief \ref named-func-param "Named parameter"
     1089    ///for setting ReachedMap object.
     1090    ///
     1091    /// \ref named-func-param "Named parameter"
     1092    ///for setting ReachedMap object.
    10871093    template<class T>
    10881094    BfsWizard<SetReachedMapBase<T> > reachedMap(const T &t)
     
    10981104      SetDistMapBase(const TR &b) : TR(b) {}
    10991105    };
    1100 
    1101     ///\brief \ref named-templ-param "Named parameter" for setting
    1102     ///the distance map.
    1103     ///
    1104     ///\ref named-templ-param "Named parameter" function for setting
    1105     ///the map that stores the distances of the nodes calculated
    1106     ///by the algorithm.
     1106    ///\brief \ref named-func-param "Named parameter"
     1107    ///for setting DistMap object.
     1108    ///
     1109    /// \ref named-func-param "Named parameter"
     1110    ///for setting DistMap object.
    11071111    template<class T>
    11081112    BfsWizard<SetDistMapBase<T> > distMap(const T &t)
     
    11181122      SetProcessedMapBase(const TR &b) : TR(b) {}
    11191123    };
    1120 
    1121     ///\brief \ref named-func-param "Named parameter" for setting
    1122     ///the processed map.
    1123     ///
    1124     ///\ref named-templ-param "Named parameter" function for setting
    1125     ///the map that indicates which nodes are processed.
     1124    ///\brief \ref named-func-param "Named parameter"
     1125    ///for setting ProcessedMap object.
     1126    ///
     1127    /// \ref named-func-param "Named parameter"
     1128    ///for setting ProcessedMap object.
    11261129    template<class T>
    11271130    BfsWizard<SetProcessedMapBase<T> > processedMap(const T &t)
     
    12621265    ///
    12631266    /// The type of the map that indicates which nodes are reached.
    1264     /// It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     1267    /// It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    12651268    typedef typename Digraph::template NodeMap<bool> ReachedMap;
    12661269
     
    17331736    ///@{
    17341737
    1735     /// \brief Checks if the given node is reached from the root(s).
     1738    /// \brief Checks if a node is reached from the root(s).
    17361739    ///
    17371740    /// Returns \c true if \c v is reached from the root(s).
  • lemon/dfs.h

    r717 r713  
    4848    ///The type of the map that stores the predecessor
    4949    ///arcs of the %DFS paths.
    50     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     50    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    5151    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
    5252    ///Instantiates a \c PredMap.
     
    6363
    6464    ///The type of the map that indicates which nodes are processed.
    65     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
    66     ///By default it is a NullMap.
     65    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    6766    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
    6867    ///Instantiates a \c ProcessedMap.
     
    8382
    8483    ///The type of the map that indicates which nodes are reached.
    85     ///It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     84    ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    8685    typedef typename Digraph::template NodeMap<bool> ReachedMap;
    8786    ///Instantiates a \c ReachedMap.
     
    9897
    9998    ///The type of the map that stores the distances of the nodes.
    100     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     99    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    101100    typedef typename Digraph::template NodeMap<int> DistMap;
    102101    ///Instantiates a \c DistMap.
     
    226225    ///\ref named-templ-param "Named parameter" for setting
    227226    ///\c PredMap type.
    228     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     227    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    229228    template <class T>
    230229    struct SetPredMap : public Dfs<Digraph, SetPredMapTraits<T> > {
     
    246245    ///\ref named-templ-param "Named parameter" for setting
    247246    ///\c DistMap type.
    248     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     247    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    249248    template <class T>
    250249    struct SetDistMap : public Dfs< Digraph, SetDistMapTraits<T> > {
     
    266265    ///\ref named-templ-param "Named parameter" for setting
    267266    ///\c ReachedMap type.
    268     ///It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     267    ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    269268    template <class T>
    270269    struct SetReachedMap : public Dfs< Digraph, SetReachedMapTraits<T> > {
     
    286285    ///\ref named-templ-param "Named parameter" for setting
    287286    ///\c ProcessedMap type.
    288     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     287    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    289288    template <class T>
    290289    struct SetProcessedMap : public Dfs< Digraph, SetProcessedMapTraits<T> > {
     
    671670    ///@{
    672671
    673     ///The DFS path to the given node.
    674 
    675     ///Returns the DFS path to the given node from the root(s).
     672    ///The DFS path to a node.
     673
     674    ///Returns the DFS path to a node.
    676675    ///
    677676    ///\warning \c t should be reached from the root(s).
     
    681680    Path path(Node t) const { return Path(*G, *_pred, t); }
    682681
    683     ///The distance of the given node from the root(s).
    684 
    685     ///Returns the distance of the given node from the root(s).
     682    ///The distance of a node from the root(s).
     683
     684    ///Returns the distance of a node from the root(s).
    686685    ///
    687686    ///\warning If node \c v is not reached from the root(s), then
     
    692691    int dist(Node v) const { return (*_dist)[v]; }
    693692
    694     ///Returns the 'previous arc' of the %DFS tree for the given node.
     693    ///Returns the 'previous arc' of the %DFS tree for a node.
    695694
    696695    ///This function returns the 'previous arc' of the %DFS tree for the
     
    700699    ///
    701700    ///The %DFS tree used here is equal to the %DFS tree used in
    702     ///\ref predNode() and \ref predMap().
     701    ///\ref predNode().
    703702    ///
    704703    ///\pre Either \ref run(Node) "run()" or \ref init()
     
    706705    Arc predArc(Node v) const { return (*_pred)[v];}
    707706
    708     ///Returns the 'previous node' of the %DFS tree for the given node.
     707    ///Returns the 'previous node' of the %DFS tree.
    709708
    710709    ///This function returns the 'previous node' of the %DFS
    711710    ///tree for the node \c v, i.e. it returns the last but one node
    712     ///of a %DFS path from a root to \c v. It is \c INVALID
     711    ///from a %DFS path from a root to \c v. It is \c INVALID
    713712    ///if \c v is not reached from the root(s) or if \c v is a root.
    714713    ///
    715714    ///The %DFS tree used here is equal to the %DFS tree used in
    716     ///\ref predArc() and \ref predMap().
     715    ///\ref predArc().
    717716    ///
    718717    ///\pre Either \ref run(Node) "run()" or \ref init()
     
    735734    ///
    736735    ///Returns a const reference to the node map that stores the predecessor
    737     ///arcs, which form the DFS tree (forest).
     736    ///arcs, which form the DFS tree.
    738737    ///
    739738    ///\pre Either \ref run(Node) "run()" or \ref init()
     
    741740    const PredMap &predMap() const { return *_pred;}
    742741
    743     ///Checks if the given node. node is reached from the root(s).
     742    ///Checks if a node is reached from the root(s).
    744743
    745744    ///Returns \c true if \c v is reached from the root(s).
     
    767766    ///The type of the map that stores the predecessor
    768767    ///arcs of the %DFS paths.
    769     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     768    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    770769    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
    771770    ///Instantiates a PredMap.
     
    782781
    783782    ///The type of the map that indicates which nodes are processed.
    784     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     783    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    785784    ///By default it is a NullMap.
    786785    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
     
    802801
    803802    ///The type of the map that indicates which nodes are reached.
    804     ///It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     803    ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    805804    typedef typename Digraph::template NodeMap<bool> ReachedMap;
    806805    ///Instantiates a ReachedMap.
     
    817816
    818817    ///The type of the map that stores the distances of the nodes.
    819     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     818    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    820819    typedef typename Digraph::template NodeMap<int> DistMap;
    821820    ///Instantiates a DistMap.
     
    832831
    833832    ///The type of the DFS paths.
    834     ///It must conform to the \ref concepts::Path "Path" concept.
     833    ///It must meet the \ref concepts::Path "Path" concept.
    835834    typedef lemon::Path<Digraph> Path;
    836835  };
     
    838837  /// Default traits class used by DfsWizard
    839838
    840   /// Default traits class used by DfsWizard.
    841   /// \tparam GR The type of the digraph.
     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.
    842845  template<class GR>
    843846  class DfsWizardBase : public DfsWizardDefaultTraits<GR>
     
    867870    /// Constructor.
    868871
    869     /// This constructor does not require parameters, it initiates
     872    /// This constructor does not require parameters, therefore it initiates
    870873    /// all of the attributes to \c 0.
    871874    DfsWizardBase() : _g(0), _reached(0), _processed(0), _pred(0),
     
    897900    typedef TR Base;
    898901
     902    ///The type of the digraph the algorithm runs on.
    899903    typedef typename TR::Digraph Digraph;
    900904
     
    904908    typedef typename Digraph::OutArcIt OutArcIt;
    905909
     910    ///\brief The type of the map that stores the predecessor
     911    ///arcs of the DFS paths.
    906912    typedef typename TR::PredMap PredMap;
     913    ///\brief The type of the map that stores the distances of the nodes.
    907914    typedef typename TR::DistMap DistMap;
     915    ///\brief The type of the map that indicates which nodes are reached.
    908916    typedef typename TR::ReachedMap ReachedMap;
     917    ///\brief The type of the map that indicates which nodes are processed.
    909918    typedef typename TR::ProcessedMap ProcessedMap;
     919    ///The type of the DFS paths
    910920    typedef typename TR::Path Path;
    911921
     
    9901000      SetPredMapBase(const TR &b) : TR(b) {}
    9911001    };
    992 
    993     ///\brief \ref named-templ-param "Named parameter" for setting
    994     ///the predecessor map.
    995     ///
    996     ///\ref named-templ-param "Named parameter" function for setting
    997     ///the map that stores the predecessor arcs of the nodes.
     1002    ///\brief \ref named-func-param "Named parameter"
     1003    ///for setting PredMap object.
     1004    ///
     1005    ///\ref named-func-param "Named parameter"
     1006    ///for setting PredMap object.
    9981007    template<class T>
    9991008    DfsWizard<SetPredMapBase<T> > predMap(const T &t)
     
    10091018      SetReachedMapBase(const TR &b) : TR(b) {}
    10101019    };
    1011 
    1012     ///\brief \ref named-templ-param "Named parameter" for setting
    1013     ///the reached map.
    1014     ///
    1015     ///\ref named-templ-param "Named parameter" function for setting
    1016     ///the map that indicates which nodes are reached.
     1020    ///\brief \ref named-func-param "Named parameter"
     1021    ///for setting ReachedMap object.
     1022    ///
     1023    /// \ref named-func-param "Named parameter"
     1024    ///for setting ReachedMap object.
    10171025    template<class T>
    10181026    DfsWizard<SetReachedMapBase<T> > reachedMap(const T &t)
     
    10281036      SetDistMapBase(const TR &b) : TR(b) {}
    10291037    };
    1030 
    1031     ///\brief \ref named-templ-param "Named parameter" for setting
    1032     ///the distance map.
    1033     ///
    1034     ///\ref named-templ-param "Named parameter" function for setting
    1035     ///the map that stores the distances of the nodes calculated
    1036     ///by the algorithm.
     1038    ///\brief \ref named-func-param "Named parameter"
     1039    ///for setting DistMap object.
     1040    ///
     1041    /// \ref named-func-param "Named parameter"
     1042    ///for setting DistMap object.
    10371043    template<class T>
    10381044    DfsWizard<SetDistMapBase<T> > distMap(const T &t)
     
    10481054      SetProcessedMapBase(const TR &b) : TR(b) {}
    10491055    };
    1050 
    1051     ///\brief \ref named-func-param "Named parameter" for setting
    1052     ///the processed map.
    1053     ///
    1054     ///\ref named-templ-param "Named parameter" function for setting
    1055     ///the map that indicates which nodes are processed.
     1056    ///\brief \ref named-func-param "Named parameter"
     1057    ///for setting ProcessedMap object.
     1058    ///
     1059    /// \ref named-func-param "Named parameter"
     1060    ///for setting ProcessedMap object.
    10561061    template<class T>
    10571062    DfsWizard<SetProcessedMapBase<T> > processedMap(const T &t)
     
    12041209    ///
    12051210    /// The type of the map that indicates which nodes are reached.
    1206     /// It must conform to the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
     1211    /// It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
    12071212    typedef typename Digraph::template NodeMap<bool> ReachedMap;
    12081213
     
    16161621    ///@{
    16171622
    1618     /// \brief Checks if the given node is reached from the root(s).
     1623    /// \brief Checks if a node is reached from the root(s).
    16191624    ///
    16201625    /// Returns \c true if \c v is reached from the root(s).
  • lemon/dijkstra.h

    r717 r713  
    7171
    7272    ///The type of the map that stores the arc lengths.
    73     ///It must conform to the \ref concepts::ReadMap "ReadMap" concept.
     73    ///It must meet the \ref concepts::ReadMap "ReadMap" concept.
    7474    typedef LEN LengthMap;
    75     ///The type of the arc lengths.
     75    ///The type of the length of the arcs.
    7676    typedef typename LEN::Value Value;
    7777
     
    117117    ///The type of the map that stores the predecessor
    118118    ///arcs of the shortest paths.
    119     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     119    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    120120    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
    121121    ///Instantiates a \c PredMap.
     
    132132
    133133    ///The type of the map that indicates which nodes are processed.
    134     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     134    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    135135    ///By default it is a NullMap.
    136136    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
     
    152152
    153153    ///The type of the map that stores the distances of the nodes.
    154     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     154    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    155155    typedef typename Digraph::template NodeMap<typename LEN::Value> DistMap;
    156156    ///Instantiates a \c DistMap.
     
    169169  /// \ingroup shortest_path
    170170  ///This class provides an efficient implementation of the %Dijkstra algorithm.
    171   ///
    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.
    175171  ///
    176172  ///The arc lengths are passed to the algorithm using a
     
    206202    typedef typename TR::Digraph Digraph;
    207203
    208     ///The type of the arc lengths.
     204    ///The type of the length of the arcs.
    209205    typedef typename TR::LengthMap::Value Value;
    210206    ///The type of the map that stores the arc lengths.
     
    309305    ///\ref named-templ-param "Named parameter" for setting
    310306    ///\c PredMap type.
    311     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     307    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    312308    template <class T>
    313309    struct SetPredMap
     
    330326    ///\ref named-templ-param "Named parameter" for setting
    331327    ///\c DistMap type.
    332     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     328    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    333329    template <class T>
    334330    struct SetDistMap
     
    351347    ///\ref named-templ-param "Named parameter" for setting
    352348    ///\c ProcessedMap type.
    353     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     349    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    354350    template <class T>
    355351    struct SetProcessedMap
     
    448444    ///\ref named-templ-param "Named parameter" for setting
    449445    ///\c OperationTraits type.
    450     /// For more information see \ref DijkstraDefaultOperationTraits.
    451446    template <class T>
    452447    struct SetOperationTraits
     
    807802    ///The results of the %Dijkstra algorithm can be obtained using these
    808803    ///functions.\n
    809     ///Either \ref run(Node) "run()" or \ref init() should be called
     804    ///Either \ref run(Node) "run()" or \ref start() should be called
    810805    ///before using them.
    811806
    812807    ///@{
    813808
    814     ///The shortest path to the given node.
    815 
    816     ///Returns the shortest path to the given node from the root(s).
     809    ///The shortest path to a node.
     810
     811    ///Returns the shortest path to a node.
    817812    ///
    818813    ///\warning \c t should be reached from the root(s).
     
    822817    Path path(Node t) const { return Path(*G, *_pred, t); }
    823818
    824     ///The distance of the given node from the root(s).
    825 
    826     ///Returns the distance of the given node from the root(s).
     819    ///The distance of a node from the root(s).
     820
     821    ///Returns the distance of a node from the root(s).
    827822    ///
    828823    ///\warning If node \c v is not reached from the root(s), then
     
    833828    Value dist(Node v) const { return (*_dist)[v]; }
    834829
    835     ///\brief Returns the 'previous arc' of the shortest path tree for
    836     ///the given node.
    837     ///
     830    ///Returns the 'previous arc' of the shortest path tree for a node.
     831
    838832    ///This function returns the 'previous arc' of the shortest path
    839833    ///tree for the node \c v, i.e. it returns the last arc of a
     
    842836    ///
    843837    ///The shortest path tree used here is equal to the shortest path
    844     ///tree used in \ref predNode() and \ref predMap().
     838    ///tree used in \ref predNode().
    845839    ///
    846840    ///\pre Either \ref run(Node) "run()" or \ref init()
     
    848842    Arc predArc(Node v) const { return (*_pred)[v]; }
    849843
    850     ///\brief Returns the 'previous node' of the shortest path tree for
    851     ///the given node.
    852     ///
     844    ///Returns the 'previous node' of the shortest path tree for a node.
     845
    853846    ///This function returns the 'previous node' of the shortest path
    854847    ///tree for the node \c v, i.e. it returns the last but one node
    855     ///of a shortest path from a root to \c v. It is \c INVALID
     848    ///from a shortest path from a root to \c v. It is \c INVALID
    856849    ///if \c v is not reached from the root(s) or if \c v is a root.
    857850    ///
    858851    ///The shortest path tree used here is equal to the shortest path
    859     ///tree used in \ref predArc() and \ref predMap().
     852    ///tree used in \ref predArc().
    860853    ///
    861854    ///\pre Either \ref run(Node) "run()" or \ref init()
     
    878871    ///
    879872    ///Returns a const reference to the node map that stores the predecessor
    880     ///arcs, which form the shortest path tree (forest).
     873    ///arcs, which form the shortest path tree.
    881874    ///
    882875    ///\pre Either \ref run(Node) "run()" or \ref init()
     
    884877    const PredMap &predMap() const { return *_pred;}
    885878
    886     ///Checks if the given node is reached from the root(s).
     879    ///Checks if a node is reached from the root(s).
    887880
    888881    ///Returns \c true if \c v is reached from the root(s).
     
    903896                                          Heap::POST_HEAP; }
    904897
    905     ///The current distance of the given node from the root(s).
    906 
    907     ///Returns the current distance of the given node from the root(s).
     898    ///The current distance of a node from the root(s).
     899
     900    ///Returns the current distance of a node from the root(s).
    908901    ///It may be decreased in the following processes.
    909902    ///
     
    932925
    933926    ///The type of the map that stores the arc lengths.
    934     ///It must conform to the \ref concepts::ReadMap "ReadMap" concept.
     927    ///It must meet the \ref concepts::ReadMap "ReadMap" concept.
    935928    typedef LEN LengthMap;
    936     ///The type of the arc lengths.
     929    ///The type of the length of the arcs.
    937930    typedef typename LEN::Value Value;
    938931
     
    981974    ///The type of the map that stores the predecessor
    982975    ///arcs of the shortest paths.
    983     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     976    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    984977    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
    985978    ///Instantiates a PredMap.
     
    996989
    997990    ///The type of the map that indicates which nodes are processed.
    998     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     991    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    999992    ///By default it is a NullMap.
    1000993    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
     
    10161009
    10171010    ///The type of the map that stores the distances of the nodes.
    1018     ///It must conform to the \ref concepts::WriteMap "WriteMap" concept.
     1011    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
    10191012    typedef typename Digraph::template NodeMap<typename LEN::Value> DistMap;
    10201013    ///Instantiates a DistMap.
     
    10311024
    10321025    ///The type of the shortest paths.
    1033     ///It must conform to the \ref concepts::Path "Path" concept.
     1026    ///It must meet the \ref concepts::Path "Path" concept.
    10341027    typedef lemon::Path<Digraph> Path;
    10351028  };
     
    10371030  /// Default traits class used by DijkstraWizard
    10381031
    1039   /// Default traits class used by DijkstraWizard.
    1040   /// \tparam GR The type of the digraph.
    1041   /// \tparam LEN The type of the length map.
     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.
    10421038  template<typename GR, typename LEN>
    10431039  class DijkstraWizardBase : public DijkstraWizardDefaultTraits<GR,LEN>
     
    10981094    typedef TR Base;
    10991095
     1096    ///The type of the digraph the algorithm runs on.
    11001097    typedef typename TR::Digraph Digraph;
    11011098
     
    11051102    typedef typename Digraph::OutArcIt OutArcIt;
    11061103
     1104    ///The type of the map that stores the arc lengths.
    11071105    typedef typename TR::LengthMap LengthMap;
     1106    ///The type of the length of the arcs.
    11081107    typedef typename LengthMap::Value Value;
     1108    ///\brief The type of the map that stores the predecessor
     1109    ///arcs of the shortest paths.
    11091110    typedef typename TR::PredMap PredMap;
     1111    ///The type of the map that stores the distances of the nodes.
    11101112    typedef typename TR::DistMap DistMap;
     1113    ///The type of the map that indicates which nodes are processed.
    11111114    typedef typename TR::ProcessedMap ProcessedMap;
     1115    ///The type of the shortest paths
    11121116    typedef typename TR::Path Path;
     1117    ///The heap type used by the dijkstra algorithm.
    11131118    typedef typename TR::Heap Heap;
    11141119
     
    11821187      SetPredMapBase(const TR &b) : TR(b) {}
    11831188    };
    1184 
    1185     ///\brief \ref named-templ-param "Named parameter" for setting
    1186     ///the predecessor map.
    1187     ///
    1188     ///\ref named-templ-param "Named parameter" function for setting
    1189     ///the map that stores the predecessor arcs of the nodes.
     1189    ///\brief \ref named-func-param "Named parameter"
     1190    ///for setting PredMap object.
     1191    ///
     1192    ///\ref named-func-param "Named parameter"
     1193    ///for setting PredMap object.
    11901194    template<class T>
    11911195    DijkstraWizard<SetPredMapBase<T> > predMap(const T &t)
     
    12011205      SetDistMapBase(const TR &b) : TR(b) {}
    12021206    };
    1203 
    1204     ///\brief \ref named-templ-param "Named parameter" for setting
    1205     ///the distance map.
    1206     ///
    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.
     1207    ///\brief \ref named-func-param "Named parameter"
     1208    ///for setting DistMap object.
     1209    ///
     1210    ///\ref named-func-param "Named parameter"
     1211    ///for setting DistMap object.
    12101212    template<class T>
    12111213    DijkstraWizard<SetDistMapBase<T> > distMap(const T &t)
     
    12211223      SetProcessedMapBase(const TR &b) : TR(b) {}
    12221224    };
    1223 
    1224     ///\brief \ref named-func-param "Named parameter" for setting
    1225     ///the processed map.
    1226     ///
    1227     ///\ref named-templ-param "Named parameter" function for setting
    1228     ///the map that indicates which nodes are processed.
     1225    ///\brief \ref named-func-param "Named parameter"
     1226    ///for setting ProcessedMap object.
     1227    ///
     1228    /// \ref named-func-param "Named parameter"
     1229    ///for setting ProcessedMap object.
    12291230    template<class T>
    12301231    DijkstraWizard<SetProcessedMapBase<T> > processedMap(const T &t)
     
    12391240      SetPathBase(const TR &b) : TR(b) {}
    12401241    };
    1241 
    12421242    ///\brief \ref named-func-param "Named parameter"
    12431243    ///for getting the shortest path to the target node.
  • lemon/maps.h

    r717 r695  
    17901790  /// \code
    17911791  ///   std::vector<Node> v;
    1792   ///   dfs(g).processedMap(loggerBoolMap(std::back_inserter(v))).run(s);
     1792  ///   dfs(g,s).processedMap(loggerBoolMap(std::back_inserter(v))).run();
    17931793  /// \endcode
    17941794  /// \code
    17951795  ///   std::vector<Node> v(countNodes(g));
    1796   ///   dfs(g).processedMap(loggerBoolMap(v.begin())).run(s);
     1796  ///   dfs(g,s).processedMap(loggerBoolMap(v.begin())).run();
    17971797  /// \endcode
    17981798  ///
Note: See TracChangeset for help on using the changeset viewer.