src/lemon/dfs.h
changeset 1221 6706c788ebb5
parent 1218 5331168bbb18
child 1233 f3d856bf1ebf
equal deleted inserted replaced
4:939c29d0e8f0 5:83cc32bb1e3e
   429       }
   429       }
   430       _dist = &m;
   430       _dist = &m;
   431       return *this;
   431       return *this;
   432     }
   432     }
   433 
   433 
       
   434     ///Sets the map indicating if a node is reached.
       
   435 
       
   436     ///Sets the map indicating if a node is reached.
       
   437     ///If you don't use this function before calling \ref run(),
       
   438     ///it will allocate one. The destuctor deallocates this
       
   439     ///automatically allocated map, of course.
       
   440     ///\return <tt> (*this) </tt>
       
   441     Dfs &reachedMap(ReachedMap &m) 
       
   442     {
       
   443       if(local_reached) {
       
   444 	delete _reached;
       
   445 	local_reached=false;
       
   446       }
       
   447       _reached = &m;
       
   448       return *this;
       
   449     }
       
   450 
       
   451     ///Sets the map indicating if a node is processed.
       
   452 
       
   453     ///Sets the map indicating if a node is processed.
       
   454     ///If you don't use this function before calling \ref run(),
       
   455     ///it will allocate one. The destuctor deallocates this
       
   456     ///automatically allocated map, of course.
       
   457     ///\return <tt> (*this) </tt>
       
   458     Dfs &processedMap(ProcessedMap &m) 
       
   459     {
       
   460       if(local_processed) {
       
   461 	delete _processed;
       
   462 	local_processed=false;
       
   463       }
       
   464       _processed = &m;
       
   465       return *this;
       
   466     }
       
   467 
   434   public:
   468   public:
   435     ///\name Execution control
   469     ///\name Execution control
   436     ///The simplest way to execute the algorithm is to use
   470     ///The simplest way to execute the algorithm is to use
   437     ///one of the member functions called \c run(...).
   471     ///one of the member functions called \c run(...).
   438     ///\n
   472     ///\n