Changeset 525:9605e051942f in lemon for lemon/dfs.h
 Timestamp:
 02/23/09 12:10:26 (15 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/dfs.h
r463 r525 50 50 ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 51 51 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. 55 55 ///\param g is the digraph, to which we would like to define the 56 /// PredMap.56 ///\ref PredMap. 57 57 static PredMap *createPredMap(const Digraph &g) 58 58 { … … 65 65 ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 66 66 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. 70 70 ///\param g is the digraph, to which 71 ///we would like to define the ProcessedMap71 ///we would like to define the \ref ProcessedMap. 72 72 #ifdef DOXYGEN 73 73 static ProcessedMap *createProcessedMap(const Digraph &g) … … 84 84 ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept. 85 85 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. 89 89 ///\param g is the digraph, to which 90 ///we would like to define the ReachedMap.90 ///we would like to define the \ref ReachedMap. 91 91 static ReachedMap *createReachedMap(const Digraph &g) 92 92 { … … 99 99 ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 100 100 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. 104 104 ///\param g is the digraph, to which we would like to define the 105 /// DistMap.105 ///\ref DistMap. 106 106 static DistMap *createDistMap(const Digraph &g) 107 107 { … … 221 221 }; 222 222 ///\brief \ref namedtemplparam "Named parameter" for setting 223 /// PredMap type.223 ///\c PredMap type. 224 224 /// 225 225 ///\ref namedtemplparam "Named parameter" for setting 226 /// PredMap type.226 ///\c PredMap type. 227 227 ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 228 228 template <class T> … … 241 241 }; 242 242 ///\brief \ref namedtemplparam "Named parameter" for setting 243 /// DistMap type.243 ///\c DistMap type. 244 244 /// 245 245 ///\ref namedtemplparam "Named parameter" for setting 246 /// DistMap type.246 ///\c DistMap type. 247 247 ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 248 248 template <class T> … … 261 261 }; 262 262 ///\brief \ref namedtemplparam "Named parameter" for setting 263 /// ReachedMap type.263 ///\c ReachedMap type. 264 264 /// 265 265 ///\ref namedtemplparam "Named parameter" for setting 266 /// ReachedMap type.266 ///\c ReachedMap type. 267 267 ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept. 268 268 template <class T> … … 281 281 }; 282 282 ///\brief \ref namedtemplparam "Named parameter" for setting 283 /// ProcessedMap type.283 ///\c ProcessedMap type. 284 284 /// 285 285 ///\ref namedtemplparam "Named parameter" for setting 286 /// ProcessedMap type.286 ///\c ProcessedMap type. 287 287 ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 288 288 template <class T> … … 299 299 }; 300 300 ///\brief \ref namedtemplparam "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>. 302 302 /// 303 303 ///\ref namedtemplparam "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>. 305 305 ///If you don't set it explicitly, it will be automatically allocated. 306 306 struct SetStandardProcessedMap : … … 1127 1127 /// This class defines the interface of the DfsVisit events, and 1128 1128 /// it could be the base of a real visitor class. 1129 template <typename _Digraph>1129 template <typename GR> 1130 1130 struct DfsVisitor { 1131 typedef _DigraphDigraph;1131 typedef GR Digraph; 1132 1132 typedef typename Digraph::Arc Arc; 1133 1133 typedef typename Digraph::Node Node; … … 1165 1165 }; 1166 1166 #else 1167 template <typename _Digraph>1167 template <typename GR> 1168 1168 struct DfsVisitor { 1169 typedef _DigraphDigraph;1169 typedef GR Digraph; 1170 1170 typedef typename Digraph::Arc Arc; 1171 1171 typedef typename Digraph::Node Node; … … 1200 1200 /// Default traits class of DfsVisit class. 1201 1201 /// \tparam _Digraph The type of the digraph the algorithm runs on. 1202 template<class _Digraph>1202 template<class GR> 1203 1203 struct DfsVisitDefaultTraits { 1204 1204 1205 1205 /// \brief The type of the digraph the algorithm runs on. 1206 typedef _DigraphDigraph;1206 typedef GR Digraph; 1207 1207 1208 1208 /// \brief The type of the map that indicates which nodes are reached. … … 1225 1225 /// \ingroup search 1226 1226 /// 1227 /// \brief %DFS algorithm class with visitor interface.1227 /// \brief DFS algorithm class with visitor interface. 1228 1228 /// 1229 /// This class provides an efficient implementation of the %DFS algorithm1229 /// This class provides an efficient implementation of the DFS algorithm 1230 1230 /// with visitor interface. 1231 1231 /// 1232 /// The %DfsVisit class provides an alternative interface to the Dfs1232 /// The DfsVisit class provides an alternative interface to the Dfs 1233 1233 /// class. It works with callback mechanism, the DfsVisit object calls 1234 1234 /// the member functions of the \c Visitor class on every DFS event. … … 1239 1239 /// instead. 1240 1240 /// 1241 /// \tparam _DigraphThe type of the digraph the algorithm runs on.1242 /// The default value is1243 /// \ref ListDigraph. The value of _Digraph is not used directly by1244 /// \ref DfsVisit,it is only passed to \ref DfsVisitDefaultTraits.1245 /// \tparam _VisitorThe Visitor type that is used by the algorithm.1246 /// \ref DfsVisitor "DfsVisitor< _Digraph>" is an empty visitor, which1241 /// \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 1247 1247 /// does not observe the DFS events. If you want to observe the DFS 1248 1248 /// events, you should implement your own visitor class. 1249 /// \tparam _TraitsTraits class to set various data types used by the1249 /// \tparam TR Traits class to set various data types used by the 1250 1250 /// algorithm. The default traits class is 1251 /// \ref DfsVisitDefaultTraits "DfsVisitDefaultTraits< _Digraph>".1251 /// \ref DfsVisitDefaultTraits "DfsVisitDefaultTraits<GR>". 1252 1252 /// See \ref DfsVisitDefaultTraits for the documentation of 1253 1253 /// a DFS visit traits class. 1254 1254 #ifdef DOXYGEN 1255 template <typename _Digraph, typename _Visitor, typename _Traits>1255 template <typename GR, typename VS, typename TR> 1256 1256 #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> > 1260 1260 #endif 1261 1261 class DfsVisit { … … 1263 1263 1264 1264 ///The traits class. 1265 typedef _TraitsTraits;1265 typedef TR Traits; 1266 1266 1267 1267 ///The type of the digraph the algorithm runs on. … … 1269 1269 1270 1270 ///The visitor type used by the algorithm. 1271 typedef _VisitorVisitor;1271 typedef VS Visitor; 1272 1272 1273 1273 ///The type of the map that indicates which nodes are reached.
Note: See TracChangeset
for help on using the changeset viewer.