Changeset 1709:a323456bf7c8 in lemon0.x for lemon/dfs.h
 Timestamp:
 10/05/05 18:45:37 (14 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@2236
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/dfs.h
r1694 r1709 58 58 return new PredMap(G); 59 59 } 60 // ///\brief The type of the map that stores the last but one61 // ///nodes of the %DFS paths.62 // ///63 // ///The type of the map that stores the last but one64 // ///nodes of the %DFS paths.65 // ///It must meet the \ref concept::WriteMap "WriteMap" concept.66 // ///67 // typedef NullMap<typename Graph::Node,typename Graph::Node> PredNodeMap;68 // ///Instantiates a PredNodeMap.69 70 // ///This function instantiates a \ref PredNodeMap.71 // ///\param G is the graph, to which72 // ///we would like to define the \ref PredNodeMap73 // static PredNodeMap *createPredNodeMap(const GR &G)74 // {75 // return new PredNodeMap();76 // }77 60 78 61 ///The type of the map that indicates which nodes are processed. … … 180 163 ///edges of the %DFS paths. 181 164 typedef typename TR::PredMap PredMap; 182 // ///\brief The type of the map that stores the last but one183 // ///nodes of the %DFS paths.184 // typedef typename TR::PredNodeMap PredNodeMap;185 165 ///The type of the map indicating which nodes are reached. 186 166 typedef typename TR::ReachedMap ReachedMap; … … 196 176 ///Indicates if \ref _pred is locally allocated (\c true) or not. 197 177 bool local_pred; 198 // ///Pointer to the map of predecessors nodes.199 // PredNodeMap *_predNode;200 // ///Indicates if \ref _predNode is locally allocated (\c true) or not.201 // bool local_predNode;202 178 ///Pointer to the map of distances. 203 179 DistMap *_dist; … … 215 191 std::vector<typename Graph::OutEdgeIt> _stack; 216 192 int _stack_head; 217 // ///The source node of the last execution.218 // Node source;219 193 220 194 ///Creates the maps if necessary. … … 228 202 _pred = Traits::createPredMap(*G); 229 203 } 230 // if(!_predNode) {231 // local_predNode = true;232 // _predNode = Traits::createPredNodeMap(*G);233 // }234 204 if(!_dist) { 235 205 local_dist = true; … … 247 217 248 218 public : 249 219 220 typedef Dfs Create; 221 250 222 ///\name Named template parameters 251 223 … … 265 237 /// 266 238 template <class T> 267 class DefPredMap : public Dfs< Graph, 268 DefPredMapTraits<T> > { }; 269 270 // template <class T> 271 // struct DefPredNodeMapTraits : public Traits { 272 // typedef T PredNodeMap; 273 // static PredNodeMap *createPredNodeMap(const Graph &G) 274 // { 275 // throw UninitializedParameter(); 276 // } 277 // }; 278 // ///\ref namedtemplparam "Named parameter" for setting PredNodeMap type 279 280 // ///\ref namedtemplparam "Named parameter" for setting PredNodeMap type 281 // /// 282 // template <class T> 283 // class DefPredNodeMap : public Dfs< Graph, 284 // LengthMap, 285 // DefPredNodeMapTraits<T> > { }; 239 struct DefPredMap : public Dfs<Graph, DefPredMapTraits<T> > { 240 typedef Dfs<Graph, DefPredMapTraits<T> > Create; 241 }; 242 286 243 287 244 template <class T> … … 298 255 /// 299 256 template <class T> 300 class DefDistMap : public Dfs< Graph, 301 DefDistMapTraits<T> > { }; 257 struct DefDistMap { 258 typedef Dfs<Graph, DefDistMapTraits<T> > Create; 259 }; 302 260 303 261 template <class T> … … 314 272 /// 315 273 template <class T> 316 class DefReachedMap : public Dfs< Graph, 317 DefReachedMapTraits<T> > { }; 318 319 struct DefGraphReachedMapTraits : public Traits { 320 typedef typename Graph::template NodeMap<bool> ReachedMap; 321 static ReachedMap *createReachedMap(const Graph &G) 322 { 323 return new ReachedMap(G); 324 } 325 }; 274 struct DefReachedMap { 275 typedef Dfs< Graph, DefReachedMapTraits<T> > Create; 276 }; 277 326 278 template <class T> 327 279 struct DefProcessedMapTraits : public Traits { … … 338 290 template <class T> 339 291 struct DefProcessedMap : public Dfs< Graph, DefProcessedMapTraits<T> > { 340 typedef Dfs< Graph, DefProcessedMapTraits<T> > Dfs;292 typedef Dfs< Graph, DefProcessedMapTraits<T> > Create; 341 293 }; 342 294 … … 356 308 template <class T> 357 309 class DefProcessedMapToBeDefaultMap : 358 public Dfs< Graph, 359 DefGraphProcessedMapTraits> { }; 310 public Dfs< Graph, DefGraphProcessedMapTraits> { 311 typedef Dfs< Graph, DefGraphProcessedMapTraits> Create; 312 }; 360 313 361 314 ///@}
Note: See TracChangeset
for help on using the changeset viewer.