0
4
0
| ... | ... |
@@ -1738,13 +1738,13 @@ |
| 1738 | 1738 |
/// \brief Checks if a node is reached from the root(s). |
| 1739 | 1739 |
/// |
| 1740 | 1740 |
/// Returns \c true if \c v is reached from the root(s). |
| 1741 | 1741 |
/// |
| 1742 | 1742 |
/// \pre Either \ref run(Node) "run()" or \ref init() |
| 1743 | 1743 |
/// must be called before using this function. |
| 1744 |
bool reached(Node v) { return (*_reached)[v]; }
|
|
| 1744 |
bool reached(Node v) const { return (*_reached)[v]; }
|
|
| 1745 | 1745 |
|
| 1746 | 1746 |
///@} |
| 1747 | 1747 |
|
| 1748 | 1748 |
}; |
| 1749 | 1749 |
|
| 1750 | 1750 |
} //END OF NAMESPACE LEMON |
| ... | ... |
@@ -416,13 +416,13 @@ |
| 416 | 416 |
/// \brief Returns a const reference to the elevator. |
| 417 | 417 |
/// |
| 418 | 418 |
/// Returns a const reference to the elevator. |
| 419 | 419 |
/// |
| 420 | 420 |
/// \pre Either \ref run() or \ref init() must be called before |
| 421 | 421 |
/// using this function. |
| 422 |
const Elevator& elevator() {
|
|
| 422 |
const Elevator& elevator() const {
|
|
| 423 | 423 |
return *_level; |
| 424 | 424 |
} |
| 425 | 425 |
|
| 426 | 426 |
/// \brief Sets the tolerance used by algorithm. |
| 427 | 427 |
/// |
| 428 | 428 |
/// Sets the tolerance used by algorithm. |
| ... | ... |
@@ -641,13 +641,13 @@ |
| 641 | 641 |
/// \brief Returns a const reference to the flow map. |
| 642 | 642 |
/// |
| 643 | 643 |
/// Returns a const reference to the arc map storing the found flow. |
| 644 | 644 |
/// |
| 645 | 645 |
/// \pre Either \ref run() or \ref init() must be called before |
| 646 | 646 |
/// using this function. |
| 647 |
const FlowMap& flowMap() {
|
|
| 647 |
const FlowMap& flowMap() const {
|
|
| 648 | 648 |
return *_flow; |
| 649 | 649 |
} |
| 650 | 650 |
|
| 651 | 651 |
/** |
| 652 | 652 |
\brief Returns \c true if the given node is in a barrier. |
| 653 | 653 |
|
| ... | ... |
@@ -666,13 +666,13 @@ |
| 666 | 666 |
\pre Either \ref run() or \ref init() must be called before |
| 667 | 667 |
using this function. |
| 668 | 668 |
|
| 669 | 669 |
\sa barrierMap() |
| 670 | 670 |
\sa checkBarrier() |
| 671 | 671 |
*/ |
| 672 |
bool barrier(const Node& node) |
|
| 672 |
bool barrier(const Node& node) const |
|
| 673 | 673 |
{
|
| 674 | 674 |
return (*_level)[node] >= _el; |
| 675 | 675 |
} |
| 676 | 676 |
|
| 677 | 677 |
/// \brief Gives back a barrier. |
| 678 | 678 |
/// |
| ... | ... |
@@ -689,13 +689,13 @@ |
| 689 | 689 |
/// \pre Either \ref run() or \ref init() must be called before |
| 690 | 690 |
/// using this function. |
| 691 | 691 |
/// |
| 692 | 692 |
/// \sa barrier() |
| 693 | 693 |
/// \sa checkBarrier() |
| 694 | 694 |
template<class BarrierMap> |
| 695 |
void barrierMap(BarrierMap &bar) |
|
| 695 |
void barrierMap(BarrierMap &bar) const |
|
| 696 | 696 |
{
|
| 697 | 697 |
for(NodeIt n(_g);n!=INVALID;++n) |
| 698 | 698 |
bar.set(n, (*_level)[n] >= _el); |
| 699 | 699 |
} |
| 700 | 700 |
|
| 701 | 701 |
/// @} |
| ... | ... |
@@ -709,13 +709,13 @@ |
| 709 | 709 |
///@{
|
| 710 | 710 |
|
| 711 | 711 |
///Check if the found flow is a feasible circulation |
| 712 | 712 |
|
| 713 | 713 |
///Check if the found flow is a feasible circulation, |
| 714 | 714 |
/// |
| 715 |
bool checkFlow() {
|
|
| 715 |
bool checkFlow() const {
|
|
| 716 | 716 |
for(ArcIt e(_g);e!=INVALID;++e) |
| 717 | 717 |
if((*_flow)[e]<(*_lo)[e]||(*_flow)[e]>(*_up)[e]) return false; |
| 718 | 718 |
for(NodeIt n(_g);n!=INVALID;++n) |
| 719 | 719 |
{
|
| 720 | 720 |
Value dif=-(*_delta)[n]; |
| 721 | 721 |
for(InArcIt e(_g,n);e!=INVALID;++e) dif-=(*_flow)[e]; |
| ... | ... |
@@ -727,13 +727,13 @@ |
| 727 | 727 |
|
| 728 | 728 |
///Check whether or not the last execution provides a barrier |
| 729 | 729 |
|
| 730 | 730 |
///Check whether or not the last execution provides a barrier. |
| 731 | 731 |
///\sa barrier() |
| 732 | 732 |
///\sa barrierMap() |
| 733 |
bool checkBarrier() |
|
| 733 |
bool checkBarrier() const |
|
| 734 | 734 |
{
|
| 735 | 735 |
Value delta=0; |
| 736 | 736 |
for(NodeIt n(_g);n!=INVALID;++n) |
| 737 | 737 |
if(barrier(n)) |
| 738 | 738 |
delta-=(*_delta)[n]; |
| 739 | 739 |
for(ArcIt e(_g);e!=INVALID;++e) |
| ... | ... |
@@ -1622,13 +1622,13 @@ |
| 1622 | 1622 |
/// \brief Checks if a node is reached from the root(s). |
| 1623 | 1623 |
/// |
| 1624 | 1624 |
/// Returns \c true if \c v is reached from the root(s). |
| 1625 | 1625 |
/// |
| 1626 | 1626 |
/// \pre Either \ref run(Node) "run()" or \ref init() |
| 1627 | 1627 |
/// must be called before using this function. |
| 1628 |
bool reached(Node v) { return (*_reached)[v]; }
|
|
| 1628 |
bool reached(Node v) const { return (*_reached)[v]; }
|
|
| 1629 | 1629 |
|
| 1630 | 1630 |
///@} |
| 1631 | 1631 |
|
| 1632 | 1632 |
}; |
| 1633 | 1633 |
|
| 1634 | 1634 |
} //END OF NAMESPACE LEMON |
| ... | ... |
@@ -363,13 +363,13 @@ |
| 363 | 363 |
/// \brief Returns a const reference to the elevator. |
| 364 | 364 |
/// |
| 365 | 365 |
/// Returns a const reference to the elevator. |
| 366 | 366 |
/// |
| 367 | 367 |
/// \pre Either \ref run() or \ref init() must be called before |
| 368 | 368 |
/// using this function. |
| 369 |
const Elevator& elevator() {
|
|
| 369 |
const Elevator& elevator() const {
|
|
| 370 | 370 |
return *_level; |
| 371 | 371 |
} |
| 372 | 372 |
|
| 373 | 373 |
/// \brief Sets the tolerance used by algorithm. |
| 374 | 374 |
/// |
| 375 | 375 |
/// Sets the tolerance used by algorithm. |
| ... | ... |
@@ -915,13 +915,13 @@ |
| 915 | 915 |
/// |
| 916 | 916 |
/// Returns a const reference to the arc map storing the found flow. |
| 917 | 917 |
/// This method can be called after the second phase of the algorithm. |
| 918 | 918 |
/// |
| 919 | 919 |
/// \pre Either \ref run() or \ref init() must be called before |
| 920 | 920 |
/// using this function. |
| 921 |
const FlowMap& flowMap() {
|
|
| 921 |
const FlowMap& flowMap() const {
|
|
| 922 | 922 |
return *_flow; |
| 923 | 923 |
} |
| 924 | 924 |
|
| 925 | 925 |
/// \brief Returns \c true when the node is on the source side of the |
| 926 | 926 |
/// minimum cut. |
| 927 | 927 |
/// |
0 comments (0 inline)