Changeset 2517:d9cfac072869 in lemon-0.x for lemon/min_mean_cycle.h
- Timestamp:
- 11/20/07 22:40:55 (16 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3393
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/min_mean_cycle.h
r2509 r2517 251 251 /// \return \c true if a cycle exists in the graph. 252 252 /// 253 /// \note Apart from the return value, m.run() is just a shortcut254 /// of the following code.253 /// \note Apart from the return value, <tt>m.run()</tt> is just a 254 /// shortcut of the following code. 255 255 /// \code 256 256 /// m.init(); … … 265 265 266 266 /// \brief Initializes the internal data structures. 267 /// 268 /// Initializes the internal data structures. 269 /// 270 /// \sa reset() 267 271 void init() { 268 272 comp_num = stronglyConnectedComponents(graph, comp); … … 342 346 /// and \ref findCycle() can be called again (e.g. when the 343 347 /// underlaying graph has been modified). 348 /// 349 /// \sa init() 344 350 void reset() { 345 351 for (NodeIt u(graph); u != INVALID; ++u) … … 354 360 /// Returns the total length of the found cycle. 355 361 /// 356 /// \pre \ref run() must be called before using this function. 362 /// \pre \ref run() or \ref findCycle() must be called before 363 /// using this function. If only \ref findMinMean() is called, 364 /// the return value is not valid. 357 365 Length cycleLength() const { 358 366 return cycle_length; … … 363 371 /// Returns the number of edges in the found cycle. 364 372 /// 365 /// \pre \ref run() must be called before using this function. 373 /// \pre \ref run() or \ref findCycle() must be called before 374 /// using this function. If only \ref findMinMean() is called, 375 /// the return value is not valid. 366 376 int cycleEdgeNum() const { 367 377 return cycle_size; … … 372 382 /// Returns the mean length of the found cycle. 373 383 /// 374 /// \pre \ref run() must be called before using this function. 384 /// \pre \ref run() or \ref findMinMean() must be called before 385 /// using this function. 375 386 /// 376 387 /// \warning LengthMap::Value must be convertible to double. 377 388 /// 378 /// \note m.minMean() is just a shortcut of the following code. 389 /// \note <tt>m.minMean()</tt> is just a shortcut of the following 390 /// code. 379 391 /// \code 380 /// return m.cycle EdgeNum() / double(m.cycleLength());392 /// return m.cycleLength() / double(m.cycleEdgeNum()); 381 393 /// \endcode 394 /// However if only \ref findMinMean() is called before using this 395 /// function, <tt>m.cycleLength()</tt> and <tt>m.cycleEdgeNum()</tt> 396 /// are not valid alone, only their ratio is valid. 382 397 double minMean() const { 383 398 return cycle_length / (double)cycle_size;
Note: See TracChangeset
for help on using the changeset viewer.