Changeset 2517:d9cfac072869 in lemon-0.x
- Timestamp:
- 11/20/07 22:40:55 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3393
- Location:
- lemon
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/bellman_ford.h
r2476 r2517 436 436 /// the path. 437 437 /// 438 /// \return %True when the algorithm have not found more shorter438 /// \return \c true when the algorithm have not found more shorter 439 439 /// paths. 440 440 bool processNextRound() { … … 473 473 /// at most k length minimal paths, this is why it is 474 474 /// called just weak round. 475 /// \return %True when the algorithm have not found more shorter paths.475 /// \return \c true when the algorithm have not found more shorter paths. 476 476 bool processNextWeakRound() { 477 477 for (int i = 0; i < int(_process.size()); ++i) { … … 518 518 /// 519 519 /// \pre init() must be called and at least one node should be added 520 /// with addSource() before using this function. If there is 521 /// a negative cycle in the graph it gives back false. 520 /// with addSource() before using this function. 522 521 /// 523 522 /// This method runs the %BellmanFord algorithm from the root node(s) … … 526 525 /// - The shortest path tree. 527 526 /// - The distance of each node from the root(s). 527 /// 528 /// \return \c false if there is a negative cycle in the graph. 528 529 bool checkedStart() { 529 530 int num = countNodes(*graph); -
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.