0
4
0
... | ... |
@@ -450,9 +450,10 @@ |
450 | 450 |
return *_level; |
451 | 451 |
} |
452 | 452 |
|
453 |
/// \brief Sets the tolerance used by algorithm. |
|
453 |
/// \brief Sets the tolerance used by the algorithm. |
|
454 | 454 |
/// |
455 |
/// Sets the tolerance used by algorithm. |
|
455 |
/// Sets the tolerance object used by the algorithm. |
|
456 |
/// \return <tt>(*this)</tt> |
|
456 | 457 |
Circulation& tolerance(const Tolerance& tolerance) { |
457 | 458 |
_tol = tolerance; |
458 | 459 |
return *this; |
... | ... |
@@ -460,7 +461,8 @@ |
460 | 461 |
|
461 | 462 |
/// \brief Returns a const reference to the tolerance. |
462 | 463 |
/// |
463 |
/// Returns a const reference to the tolerance |
|
464 |
/// Returns a const reference to the tolerance object used by |
|
465 |
/// the algorithm. |
|
464 | 466 |
const Tolerance& tolerance() const { |
465 | 467 |
return _tol; |
466 | 468 |
} |
... | ... |
@@ -97,7 +97,7 @@ |
97 | 97 |
/// \e push-relabel algorithm producing a \ref max_flow |
98 | 98 |
/// "flow of maximum value" in a digraph. |
99 | 99 |
/// The preflow algorithms are the fastest known maximum |
100 |
/// flow algorithms. The current implementation |
|
100 |
/// flow algorithms. The current implementation uses a mixture of the |
|
101 | 101 |
/// \e "highest label" and the \e "bound decrease" heuristics. |
102 | 102 |
/// The worst case time complexity of the algorithm is \f$O(n^2\sqrt{e})\f$. |
103 | 103 |
/// |
... | ... |
@@ -371,9 +371,10 @@ |
371 | 371 |
return *_level; |
372 | 372 |
} |
373 | 373 |
|
374 |
/// \brief Sets the tolerance used by algorithm. |
|
374 |
/// \brief Sets the tolerance used by the algorithm. |
|
375 | 375 |
/// |
376 |
/// Sets the tolerance used by algorithm. |
|
376 |
/// Sets the tolerance object used by the algorithm. |
|
377 |
/// \return <tt>(*this)</tt> |
|
377 | 378 |
Preflow& tolerance(const Tolerance& tolerance) { |
378 | 379 |
_tolerance = tolerance; |
379 | 380 |
return *this; |
... | ... |
@@ -381,7 +382,8 @@ |
381 | 382 |
|
382 | 383 |
/// \brief Returns a const reference to the tolerance. |
383 | 384 |
/// |
384 |
/// Returns a const reference to the tolerance |
|
385 |
/// Returns a const reference to the tolerance object used by |
|
386 |
/// the algorithm. |
|
385 | 387 |
const Tolerance& tolerance() const { |
386 | 388 |
return _tolerance; |
387 | 389 |
} |
... | ... |
@@ -87,6 +87,11 @@ |
87 | 87 |
.upperMap(ucap) |
88 | 88 |
.supplyMap(supply) |
89 | 89 |
.flowMap(flow); |
90 |
|
|
91 |
const CirculationType::Elevator& elev = const_circ_test.elevator(); |
|
92 |
circ_test.elevator(const_cast<CirculationType::Elevator&>(elev)); |
|
93 |
CirculationType::Tolerance tol = const_circ_test.tolerance(); |
|
94 |
circ_test.tolerance(tol); |
|
90 | 95 |
|
91 | 96 |
circ_test.init(); |
92 | 97 |
circ_test.greedyInit(); |
... | ... |
@@ -94,6 +94,11 @@ |
94 | 94 |
::Create PreflowType; |
95 | 95 |
PreflowType preflow_test(g, cap, n, n); |
96 | 96 |
const PreflowType& const_preflow_test = preflow_test; |
97 |
|
|
98 |
const PreflowType::Elevator& elev = const_preflow_test.elevator(); |
|
99 |
preflow_test.elevator(const_cast<PreflowType::Elevator&>(elev)); |
|
100 |
PreflowType::Tolerance tol = const_preflow_test.tolerance(); |
|
101 |
preflow_test.tolerance(tol); |
|
97 | 102 |
|
98 | 103 |
preflow_test |
99 | 104 |
.capacityMap(cap) |
0 comments (0 inline)